simonjam@chromium.org | 5871a05 | 2011-03-16 00:00:09 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
simonjam@chromium.org | 5871a05 | 2011-03-16 00:00:09 +0000 | [diff] [blame] | 4 | <script src="../../js-test-resources/js-test-pre.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; |
| 12 | |
| 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. |
| 18 | |
| 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. |
| 24 | |
simonjam@chromium.org | 5871a05 | 2011-03-16 00:00:09 +0000 | [diff] [blame] | 25 | </script> |
| 26 | <script src="../../js-test-resources/js-test-post.js"></script> |
| 27 | </body> |
| 28 | </html> |