Chromium Code Reviews| 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..e5c405baa5dec06c0da9498389fb77f9c7c71b24 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html |
| @@ -0,0 +1,19 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.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 el = document.querySelector('async-component'); |
| + assert_true(el instanceof AsyncComponent, 'async-component should be custom'); |
|
dominicc (has gone to gerrit)
2016/08/19 04:54:10
"be custom" is a bit vague; can you be more specif
kochi
2016/08/19 10:51:47
I rewrote where appropriate, but "be custom" is ok
|
| + |
| + let link = document.querySelector('link[rel=import]'); |
| + let elInImport = link.import.querySelector('async-component'); |
| + assert_true(elInImport instanceof AsyncComponent, 'async-component in import should be custom'); |
| + }); |
| +}, 'Custom Elements v1 definition in async import should work.'); |
|
dominicc (has gone to gerrit)
2016/08/19 04:54:10
Just refer to these as "custom elements"; not "v1.
kochi
2016/08/19 10:51:47
Done.
|
| +</script> |