| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 onerror = function(a, b, c, d) { | |
| 3 y(); // the error is "not handled" | |
| 4 } | |
| 5 function x() { | |
| 6 y(); | |
| 7 } | |
| 8 x(); | |
| 9 /* | |
| 10 --> | |
| 11 <!doctype html> | |
| 12 <title>onerror, "not handled" with an error in the onerror function</title> | |
| 13 <script src="/resources/testharness.js"></script> | |
| 14 <script src="/resources/testharnessreport.js"></script> | |
| 15 <div id="log"></div> | |
| 16 <script> | |
| 17 async_test(function() { | |
| 18 var worker = new Worker('#'); | |
| 19 worker.onerror = this.step_func(function(e) { | |
| 20 assert_true(e instanceof ErrorEvent, 'e instanceof ErrorEvent'); | |
| 21 assert_equals(typeof e.message, 'string', 'typeof e.message'); | |
| 22 assert_equals(e.filename, document.URL+'#', 'e.filename'); | |
| 23 assert_equals(typeof e.lineno, 'number', 'typeof e.lineno'); | |
| 24 assert_equals(typeof e.colno, 'number', 'typeof e.column'); | |
| 25 e.preventDefault(); // "handled" | |
| 26 this.done(); | |
| 27 }); | |
| 28 }); | |
| 29 </script> | |
| 30 <!-- | |
| 31 */ | |
| 32 //--> | |
| OLD | NEW |