| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <title>Throwing in event listeners</title> | 3 <title>Throwing in event listeners</title> |
| 4 <script src="../../../../resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="../../../../resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <div id="log"></div> | 6 <div id="log"></div> |
| 7 <script> | 7 <script> |
| 8 setup({allow_uncaught_exception:true}) | 8 setup({allow_uncaught_exception:true}) |
| 9 | 9 |
| 10 test(function() { | 10 test(function() { |
| 11 var errorEvents = 0; | 11 var errorEvents = 0; |
| 12 window.onerror = this.step_func(function(e) { | 12 window.onerror = this.step_func(function(e) { |
| 13 assert_equals(typeof e, 'string'); | 13 assert_equals(typeof e, 'string'); |
| 14 ++errorEvents; | 14 ++errorEvents; |
| 15 }); | 15 }); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 42 element.addEventListener('click', this.step_func(function() { | 42 element.addEventListener('click', this.step_func(function() { |
| 43 secondCalled = true; | 43 secondCalled = true; |
| 44 }), false); | 44 }), false); |
| 45 | 45 |
| 46 element.dispatchEvent(new Event('click')); | 46 element.dispatchEvent(new Event('click')); |
| 47 | 47 |
| 48 assert_equals(errorEvents, 1); | 48 assert_equals(errorEvents, 1); |
| 49 assert_true(secondCalled); | 49 assert_true(secondCalled); |
| 50 }, "Throwing in event listener with multiple listeners"); | 50 }, "Throwing in event listener with multiple listeners"); |
| 51 </script> | 51 </script> |
| OLD | NEW |