Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / misc / script-async-load-execute-in-order.html
blobed078f2543254307c46b6e49044eb2bd800b4446
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../js-test-resources/js-test.js"></script>
5 </head>
6 <body onload="debug('load');finishJSTest();">
7 Checks that async=false enforces execution order dynamically inserted scripts.
8 See: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#force-async
9 <div id="console"></div>
10 <script>
11 var jsTestIsAsync = true;
13 slowly_loaded_script = document.createElement("script");
14 slowly_loaded_script.async = false;
15 slowly_loaded_script.src = "resources/slow-async-script.cgi";
16 document.getElementsByTagName("head")[0].appendChild(slowly_loaded_script);
17 slowly_loaded_script.async = true; // Should have no effect, becaus script has already been requested.
19 quickly_loaded_script = document.createElement("script");
20 quickly_loaded_script.async = false;
21 quickly_loaded_script.src = "resources/async-script.js";
22 document.getElementsByTagName("head")[0].appendChild(quickly_loaded_script);
23 quickly_loaded_script.async = true; // Should have no effect, becaus script has already been requested.
25 </script>
26 </body>
27 </html>