OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Fetching import</title> |
| 5 <link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#fetching
-import"> |
| 6 <script src="../../../../resources/testharness.js"></script> |
| 7 <script src="../../../../resources/testharnessreport.js"></script> |
| 8 <link rel="stylesheet" href="../../../../resources/testharness.css"> |
| 9 |
| 10 <link id="first" rel="import" href="resources/hello.html"> |
| 11 <link id="shouldBeInImportMap" rel="import" href="resources/hello.html"> |
| 12 <link id="parentOfFirst" rel="import" href="resources/parent-of-hello.html"> |
| 13 |
| 14 </head> |
| 15 <body> |
| 16 <div id="log"></div> |
| 17 <script> |
| 18 test(function() { |
| 19 assert_true(window.first.import === window.shouldBeInImportMap.import); |
| 20 }, 'If LOCATION is already in the import map, let IMPORT be the imported documen
t for LOCATION and stop. (1)'); |
| 21 |
| 22 test(function() { |
| 23 console.log(window.parentOfFirst); |
| 24 assert_true(window.first.import === window.parentOfFirst.import.getElementByI
d('child').import); |
| 25 }, 'If LOCATION is already in the import map, let IMPORT be the imported documen
t for LOCATION and stop. (2)'); |
| 26 </script> |
| 27 </body> |
| 28 </html> |
OLD | NEW |