OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/testharness.js"></script> |
| 5 <script src="../../../resources/testharnessreport.js"></script> |
| 6 <script src="resources/import-custom-element-helper.js"></script> |
| 7 <script> |
| 8 |
| 9 |
| 10 var Hello = registerTestingCustomElement('x-hello'); |
| 11 var numberOfLinks = 2; |
| 12 var t1 = async_test('Custom elements in async imports wait preceeding sync impor
t before upgraded.'); |
| 13 var t2 = async_test('Custom elements in async imports wait preceeding sync impor
t before resolved.'); |
| 14 |
| 15 var latch = new ImportTestLatch(function() { |
| 16 window.setTimeout(function() { |
| 17 t1.step(function() { |
| 18 assert_array_equals(['hello-slow', 'hello-1', 'hello-2'], Hello.ids)
; |
| 19 t1.done(); |
| 20 }); |
| 21 |
| 22 t2.step(function() { |
| 23 var Bye = registerTestingCustomElement('x-bye'); |
| 24 assert_array_equals(['bye-slow', 'bye-1', 'bye-2'], Bye.ids); |
| 25 t2.done(); |
| 26 }); |
| 27 }, 0); |
| 28 }, numberOfLinks); |
| 29 </script> |
| 30 </head> |
| 31 <body> |
| 32 <link rel=import href="resources/import-slow-custom-element-hello.cgi" onload="l
atch.loaded()"> |
| 33 <link rel=import async href="resources/import-custom-element-hello-1.html" onloa
d="latch.loaded()"> |
| 34 <x-hello id="hello-2"></x-hello> |
| 35 <x-bye id="bye-2"></x-bye> |
| 36 </body> |
| 37 </html> |
OLD | NEW |