Files
servo/tests/wpt/web-platform-tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html

24 lines
550 B
HTML

<!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>