OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <script> | |
5 'use strict'; | |
6 let constructors = []; | |
7 </script> | |
8 <link rel="import" href="resources/async-nested-component.html" async> | |
9 <script> | |
10 'use strict'; | |
11 setup({ explicit_done: true }); | |
dominicc (has gone to gerrit)
2016/08/22 01:46:36
I think async_test is better than explicit done. a
kochi
2016/08/22 07:37:34
Done.
| |
12 | |
13 let link = document.querySelector('link[rel=import]'); | |
14 link.onload = () => { | |
15 test(() => { | |
16 let n1 = link.import.querySelector('a-a'); | |
17 let n2 = link.import.querySelector('b-b'); | |
18 let n3 = link.import.querySelector('c-c'); | |
19 | |
20 assert_true(n1 instanceof NestedLevel1, 'nested-level1 in import should be c ustom'); | |
21 assert_true(n2 instanceof NestedLevel2, 'nested-level2 in import should be c ustom'); | |
22 assert_true(n3 instanceof NestedLevel3, 'nested-level3 in import should be c ustom'); | |
23 | |
24 // As subimports are sync, the upgrade order should be the order of script e xecution. | |
25 let types = constructors.map(e => e.type); | |
26 assert_array_equals(types, ['nested-level3', 'nested-level2', 'nested-level1 ']); | |
27 }, 'top-level async import should properly run dependent subimports and get el ements defined.'); | |
28 done(); | |
29 } | |
30 </script> | |
OLD | NEW |