097.html (1030B)
1 <!DOCTYPE html> 2 <html><head> 3 <title> scheduler: slow-loading async script added from document.write</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> 13 log("inline script #1"); 14 document.write("<script async src='scripts/include-1.js?pipe=trickle(d2)'><\/script>") 15 </script> 16 <script> 17 log("inline script #2"); 18 var t = async_test(); 19 20 addEventListener("DOMContentLoaded", t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2"])}), false); 21 22 onload = t.step_func( 23 function() { 24 assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]); 25 t.done(); 26 }); 27 28 </script> 29 </body></html>