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 <link id="harness" rel="import" href="resources/async-child.html"> | 5 <link id="harness" rel="import" href="resources/async-child.html"> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 description("This test ensures that de-duped import can be dynamically added."); | 9 description("This test ensures that de-duped import can be dynamically added."); |
10 | 10 |
11 window.jsTestIsAsync = true; | 11 window.jsTestIsAsync = true; |
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-child.html"); | 15 linkEl.setAttribute("href", "resources/async-child.html"); |
16 document.head.appendChild(linkEl); | 16 document.head.appendChild(linkEl); |
17 linkEl.onload = function(evt) { | 17 linkEl.onload = function(evt) { |
18 shouldBe("linkEl.import", "harness.import"); | 18 shouldBe("linkEl.import", "harness.import"); |
19 finishJSTest(); | 19 finishJSTest(); |
20 }; | 20 }; |
21 | 21 |
22 </script> | 22 </script> |
23 </body> | 23 </body> |
24 </html> | 24 </html> |
OLD | NEW |