OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <script> | |
8 description("This test ensures that script-added import doesn't block scripts"); | |
9 | |
10 window.jsTestIsAsync = true; | |
11 | |
12 var importIsLoaded = false; | |
13 var scriptIsExecuted = false; | |
14 | |
15 var linkEl = document.createElement("link"); | |
16 linkEl.setAttribute("rel", "import"); | |
17 linkEl.setAttribute("href", "resources/async-child.html"); | |
18 document.head.appendChild(linkEl); | |
19 linkEl.onload = function(evt) { | |
20 debug("In onload handler - This should be called later."); | |
21 shouldBeTrue("importIsLoaded"); | |
22 shouldBeTrue("scriptIsExecuted"); | |
23 finishJSTest(); | |
24 }; | |
25 | |
26 </script> | |
27 <script> | |
28 debug("In script tag - This should be called first."); | |
29 shouldBeFalse("importIsLoaded"); | |
30 scriptIsExecuted = true; | |
31 </script> | |
32 </body> | |
33 </html> | |
OLD | NEW |