Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses tkent's comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..6a3e5fa3d4f261758dfb45c5ee8f5c6617846850
--- /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 id="import1" rel="import" href="resources/async-component.html" async>
+<a-a></a-a>
+<script>
+'use strict';
+
+promise_test(() => {
+ return customElements.whenDefined('a-a').then(() => {
+ let a = document.querySelector('a-a');
+ assert_is_upgraded(a, AsyncComponent,
+ '<async-component> in this document should have been upgraded.');
+
+ let b = import1.import.querySelector('a-a');
+ assert_is_upgraded(b, AsyncComponent,
+ '<async-component> in imported document should have been upgraded.');
+ });
+}, 'custom elements definition in async import should work.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698