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