script_006.html (552B)
1 <!doctype html> 2 <title>document.write external script followed by internal script</title> 3 <script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script> 4 <script> 5 var t = async_test(); 6 var order = []; 7 t.step(function() { 8 order.push(1); 9 document.write("<script src='006.js'><"+"/script><script>t.step(function(){order.push(4)})</script"+">"); 10 order.push(2); 11 }); 12 </script> 13 <script> 14 t.step(function() { 15 order.push(5); 16 assert_array_equals(order, [1,2,3,4,5]); 17 }); 18 t.done(); 19 </script> 20 <div id="log"></div>