| Index: third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html b/third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8a7af74a8affdcdd386bbaade732b7265d16964b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html
|
| @@ -0,0 +1,21 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../spec/resources/custom-elements-helpers.js"></script>
|
| +<link rel="import" href="resources/async-component.html" async>
|
| +<async-component></async-component>
|
| +<script>
|
| +'use strict';
|
| +promise_test(() => {
|
| + return customElements.whenDefined('async-component').then(() => {
|
| + let a = document.querySelector('async-component');
|
| + assert_is_upgraded(a, AsyncComponent,
|
| + '<async-component> in this document should have been upgraded.');
|
| +
|
| + let link = document.querySelector('link[rel=import]');
|
| + let b = link.import.querySelector('async-component');
|
| + assert_is_upgraded(b, AsyncComponent,
|
| + '<async-component> in imported document should have been upgraded.');
|
| + });
|
| +}, 'Custom Elements definition in async import should work.');
|
| +</script>
|
|
|