diff options
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html')
-rw-r--r-- | testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html b/testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html new file mode 100644 index 000000000..a67f66ead --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Invalid uncompiled raw handlers should only be compiled once.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<script> +setup({ allow_uncaught_exception: true }); + +var errors = 0; +window.onerror = function() { + errors++; +}; + +test(function() { + var e = document.body; + e.setAttribute("onclick", "window.open("); + assert_equals(e.onclick, null); + assert_equals(e.onclick, null); + assert_equals(errors, 1); +}); +</script> +</body> |