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

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/imports/resources/parser-create-element.html

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve most 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/resources/parser-create-element.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/imports/resources/parser-create-element.html b/third_party/WebKit/LayoutTests/custom-elements/imports/resources/parser-create-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..7afc558746771eb059b4f36338589602f5c908fe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/custom-elements/imports/resources/parser-create-element.html
@@ -0,0 +1,15 @@
+<a-a id="a"></a-a>
+<script>
+'use strict';
+test(() => {
+ assert_equals(constructors.length, 0);
+
+ customElements.define('a-a', class extends HTMLElement {
+ constructor() {
+ super();
+ constructors.push(this);
+ }
+ });
+}, 'Custom Element definition should upgrade parsed elements in import.');
+</script>
+<a-a id="b"></a-a>

Powered by Google App Engine
This is Rietveld 408576698