019.html (1331B)
1 <!DOCTYPE html> 2 <html><head> 3 <title> scheduler: DOM added scripts and event handling </title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="testlib/testlib.js"></script> 7 </head> 8 <body> 9 10 <div id="log">FAILED (This TC requires JavaScript enabled)</div> 11 12 <script onload="log('inline #1 load')"> 13 log('inline script #1'); 14 testlib.addScript('', {'src':'scripts/include-1.js', 'onload':function(){log("external #1 load")}}, document.getElementsByTagName('head')[0], false); 15 log('end script #1'); 16 </script> 17 18 <script type="text/javascript"> 19 log( 'inline script #2' ); 20 var t = async_test() 21 22 function test() { 23 assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'external #1 load', 'inline script #2'], 24 ['inline script #1', 'end script #1', 'inline script #2', 'external script #1', 'external #1 load'] 25 ]); 26 t.done(); 27 } 28 onload = function(){setTimeout(t.step_func(test), 100); } 29 </script> 30 31 </body></html>