| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("This test ensures that script-added import lets its child blocks fo
llowing scripts."); | 8 description("This test ensures that script-added import lets its child blocks fo
llowing scripts."); |
| 9 | 9 |
| 10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
| 11 window.trace = []; | 11 window.trace = []; |
| 12 | 12 |
| 13 var linkEl = document.createElement("link"); | 13 var linkEl = document.createElement("link"); |
| 14 linkEl.setAttribute("rel", "import"); | 14 linkEl.setAttribute("rel", "import"); |
| 15 linkEl.setAttribute("href", "resources/async-root.html"); | 15 linkEl.setAttribute("href", "resources/async-root.html"); |
| 16 document.head.appendChild(linkEl); | 16 document.head.appendChild(linkEl); |
| 17 linkEl.onload = function(evt) { | 17 linkEl.onload = function(evt) { |
| 18 shouldBe("window.trace", "['START root', 'child1', 'child2', 'END root']"); | 18 shouldBe("window.trace", "['START root', 'child1', 'child2', 'END root']"); |
| 19 finishJSTest(); | 19 finishJSTest(); |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 </script> | 22 </script> |
| 23 </body> | 23 </body> |
| 24 </html> | 24 </html> |
| OLD | NEW |