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

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html

Issue 2592333002: Push-pop custom elements reaction stack when the parser inserts elements (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html b/third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html
index 9826f8aab3b5bbf7f5161c8fb2d3a0c3f5c18f83..9b5b1ddec34e801d8833681138e6f961d8ca8997 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html
@@ -68,6 +68,31 @@ test_with_content((w) => {
});
</script>
+<template data-test="foreign content insertion executes connected">
+ <script>
+ 'use strict';
+
+ customElements.define('a-a', class extends HTMLElement {
+ constructor() {
+ super();
+ }
+ connectedCallback() {
+ window.connectedChildNodeCount = this.childNodes.length;
+ }
+ });
+ </script>
+ <a-a><div></div></a-a>
+</template>
+<script>
+'use strict';
+
+test_with_content((w) => {
+ assert_equals(w.connectedChildNodeCount, 0,
+ 'the parser should have run the connected callback when inserting the ' +
+ 'element, before continuing tree construction');
+});
+</script>
+
<template data-test="element creation failure produces unknown element">
<script>
'use strict';
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698