blob: 23f967f00cb7f0a6d74a13a799801ac2d82f09aa [file] [log] [blame]
simonjam@chromium.org5871a052011-03-16 00:00:09 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
simonjam@chromium.org5871a052011-03-16 00:00:09 +00004<script src="../../js-test-resources/js-test-pre.js"></script>
5</head>
6<body onload="debug('load');finishJSTest();">
7Checks that async=false enforces execution order dynamically inserted scripts.
8See: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#force-async
9<div id="console"></div>
10<script>
11var jsTestIsAsync = true;
12
13slowly_loaded_script = document.createElement("script");
14slowly_loaded_script.async = false;
15slowly_loaded_script.src = "resources/slow-async-script.cgi";
16document.getElementsByTagName("head")[0].appendChild(slowly_loaded_script);
17slowly_loaded_script.async = true; // Should have no effect, becaus script has already been requested.
18
19quickly_loaded_script = document.createElement("script");
20quickly_loaded_script.async = false;
21quickly_loaded_script.src = "resources/async-script.js";
22document.getElementsByTagName("head")[0].appendChild(quickly_loaded_script);
23quickly_loaded_script.async = true; // Should have no effect, becaus script has already been requested.
24
simonjam@chromium.org5871a052011-03-16 00:00:09 +000025</script>
26<script src="../../js-test-resources/js-test-post.js"></script>
27</body>
28</html>