OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <meta charset="utf-8"> |
| 3 <title>Invalid uncompiled raw handlers should only be compiled when about to cal
l them.</title> |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <body> |
| 7 <script> |
| 8 setup({ allow_uncaught_exception: true }); |
| 9 |
| 10 test(function() { |
| 11 var events = []; |
| 12 window.onerror = function() { |
| 13 events.push("Error"); |
| 14 }; |
| 15 |
| 16 var div = document.createElement("div"); |
| 17 div.addEventListener("click", function (e) { events.push("click 1") }); |
| 18 div.setAttribute("onclick", "}"); |
| 19 div.addEventListener("click", function (e) { events.push("click 2") }); |
| 20 div.dispatchEvent(new Event("click")); |
| 21 assert_equals(div.onclick, null); |
| 22 assert_array_equals(events, ["click 1", "error", "click 2"]); |
| 23 }); |
| 24 </script> |
| 25 </body> |
OLD | NEW |