OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../spec/resources/custom-elements-helpers.js"></script> |
| 5 <link rel="import" href="resources/async-component.html" async> |
| 6 <async-component></async-component> |
| 7 <script> |
| 8 'use strict'; |
| 9 promise_test(() => { |
| 10 return customElements.whenDefined('async-component').then(() => { |
| 11 let a = document.querySelector('async-component'); |
| 12 assert_is_upgraded(a, AsyncComponent, |
| 13 '<async-component> in this document should have been upgr
aded.'); |
| 14 |
| 15 let link = document.querySelector('link[rel=import]'); |
| 16 let b = link.import.querySelector('async-component'); |
| 17 assert_is_upgraded(b, AsyncComponent, |
| 18 '<async-component> in imported document should have been
upgraded.'); |
| 19 }); |
| 20 }, 'Custom Elements definition in async import should work.'); |
| 21 </script> |
OLD | NEW |