body-onerror-compile-error-data-url.html (1026B)
1 <!doctype html> 2 <html> 3 <head> 4 <title><body onerror> - compile error in <script src=data:...></title> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 </head> 8 <script> 9 setup({allow_uncaught_exception:true}); 10 var t = async_test(); 11 var t_col = async_test(document.title+' (column)'); 12 var ran = false; 13 </script> 14 <body onerror=" 15 t.step(function(){ 16 ran = true; 17 assert_equals(typeof event, 'string', 'first arg'); 18 assert_equals(source, 'data:text/javascript,for(;){}', 'second arg'); 19 assert_equals(typeof lineno, 'number', 'third arg'); 20 }); 21 t_col.step(function() { 22 assert_equals(typeof colno, 'number', 'fourth arg'); 23 }); 24 "> 25 <div id=log></div> 26 <script src="data:text/javascript,for(;){}"></script> 27 <script> 28 t.step(function(){ 29 assert_true(ran, 'ran'); 30 t.done(); 31 }); 32 t_col.step(function(){ 33 t_col.done(); 34 }); 35 </script> 36 </body> 37 </html>