summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html
blob: a67f66ead4ffce7b6692f01dbe6449e28f062f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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>