091.html (1295B)
1 <!DOCTYPE html> 2 <html><head> 3 <title> scheduler: force-async off on non-parser-inserted script</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 var t = async_test(); 14 15 sources = ["scripts/include-1.js?pipe=trickle(d2)", "scripts/include-2.js?pipe=trickle(d1)"]; 16 sources.forEach(function(x) { 17 var script = document.createElement("script"); 18 script.src = x; 19 t.step(function() {assert_equals(script.async, true, "async IDL attribute on script creation")}); 20 script.async = false; 21 t.step(function() {assert_equals(script.async, false, "async IDL attribute after setting")}); 22 t.step(function() {assert_equals(script.getAttribute("async"), null, "async content attribute after setting")}); 23 document.head.appendChild(script); 24 }); 25 26 onload = t.step_func(function() { 27 assert_array_equals(eventOrder, ['external script #1', 'external script #2']); 28 t.done(); 29 }); 30 </script> 31 </body></html>