122.html (996B)
1 <!DOCTYPE html> 2 <html><head> 3 <title>scheduler: altering the type attribute and adding/removing external 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 <div id="log"></div> 9 <script> 10 var t = async_test(); 11 </script> 12 <script id="test" type="text/plain" src="scripts/include-1.js?pipe=trickle(d1)"></script> 13 <script> 14 t.step(function() { 15 var script = document.getElementById("test"); 16 script.removeAttribute("type"); 17 var marker = document.createElement("script"); 18 marker.src = "scripts/include-2.js?pipe=trickle(d2)"; 19 marker.async = false; 20 script.parentNode.appendChild(marker); 21 script.parentNode.appendChild(script); 22 test(function() {assert_true(script.async)}, "Reinserted script async IDL attribute"); 23 }); 24 onload = t.step_func(function () { 25 assert_array_equals(eventOrder, ["external script #1", "external script #2"]); 26 t.done(); 27 }); 28 </script>