blob: 888681d2aae41a9656d47a485f737869fa23016d [file] [log] [blame]
<!DOCTYPE html>
<html><head>
<title>scheduler: altering the type attribute and adding/removing external script </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<div id="log"></div>
<script>
var t = async_test(undefined, {timeout:4000});
</script>
<script id="test" type="text/plain" src="scripts/include-1.js?pipe=trickle(d1)"></script>
<script>
t.step(function() {
var script = document.getElementById("test");
script.removeAttribute("type");
var marker = document.createElement("script");
marker.src = "scripts/include-2.js?pipe=trickle(d2)";
marker.async = false;
script.parentNode.appendChild(marker);
script.parentNode.appendChild(script);
test(function() {assert_true(script.async)}, "Reinserted script async IDL attribute");
});
onload = t.step_func(function () {
assert_array_equals(eventOrder, ["external script #1", "external script #2"]);
t.done();
});
</script>