| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>window.onerror - runtime error in setTimeout</title> |
| 5 <script src="../../../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <div id=log></div> |
| 10 <script> |
| 11 setup({allow_uncaught_exception:true}); |
| 12 var t = async_test(); |
| 13 var t_col = async_test(document.title+' (column)'); |
| 14 var ran = false; |
| 15 var col_value; |
| 16 window.onerror = t.step_func(function(a, b, c, d){ |
| 17 ran = true; |
| 18 col_value = d; |
| 19 assert_equals(typeof a, 'string', 'first arg'); |
| 20 assert_equals(b, location.href, 'second arg'); |
| 21 assert_equals(typeof c, 'number', 'third arg'); |
| 22 }); |
| 23 setTimeout("undefined_variable;", 10); |
| 24 setTimeout(function(){ |
| 25 t.step(function(){ |
| 26 assert_true(ran, 'ran'); |
| 27 t.done(); |
| 28 }); |
| 29 t_col.step(function(){ |
| 30 assert_equals(typeof col_value, 'number', 'fourth arg'); |
| 31 t_col.done(); |
| 32 }); |
| 33 }, 20); |
| 34 </script> |
| 35 </body> |
| 36 </html> |
| OLD | NEW |