037.html (998B)
1 <!DOCTYPE html> 2 <html><head> 3 <title> scheduler: DOM movement with appendChild, inline</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 <div></div> 12 <script>log('inline script #1'); 13 var script = testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], true); 14 log('end script #1'); 15 </script> 16 17 <script type="text/javascript"> 18 log( 'inline script #2' ); 19 try{ 20 document.body.appendChild(script); 21 }catch(e){ log('ERROR - tested functionality not supported'); } 22 var t = async_test() 23 24 function test() { 25 assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'end script #1', 'inline script #2' ]); 26 t.done(); 27 } 28 onload = t.step_func(function(){ 29 setTimeout(t.step_func(test), 200); 30 }); 31 </script> 32 33 </body></html>