058.html (887B)
1 <!DOCTYPE html> 2 <html><head> 3 <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM (comment only) </title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="testlib/testlib.js"></script> 7 <script>/**/</script> 8 </head> 9 <body> 10 11 <div id="log">FAILED (This TC requires JavaScript enabled)</div> 12 13 <script>log('inline script #1'); 14 var script=document.getElementsByTagName('script')[3]; 15 script.appendChild( document.createTextNode('log("injected script code");') ); 16 log('end script #1'); 17 </script> 18 <script type="text/javascript"> 19 log( 'inline script #2' ); 20 var t = async_test() 21 22 function test() { 23 assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); 24 t.done(); 25 } 26 onload = t.step_func(test); 27 </script> 28 29 </body></html>