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/shadow-dom/slotchange.html

Issue 2306643004: Check the next chain of a slotchange event correctly on a slotchange at a fallback slot (Closed)
Patch Set: Fix a test Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/slotchange.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html b/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html
index 7747bdc5b4701069f82a2f970256d75f4790ad77..08e4bc8b49825eec74513bfa75f7d1a7cb24e179 100644
--- a/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html
+++ b/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html
@@ -17,6 +17,8 @@ function doneIfSlotChange(slots, test) {
let fired = new Set();
for (let slot of slots) {
slot.addEventListener('slotchange', test.step_func((e) => {
+ if (e.target != slot)
+ return;
assert_false(fired.has(slot.id));
fired.add(slot.id);
if (fired.size == slots.length) {
@@ -281,3 +283,31 @@ async_test((test) => {
n.s1.remove();
}, "slotchange event: Even if distributed nodes do not change, slotchange should be fired if assigned nodes are changed.");
</script>
+
+<div id="test7">
+ <div id="host1">
+ <template data-mode="open">
+ <div id="host2">
+ <template data-mode="open">
+ <slot id="s3" name="slot3"></slot>
+ </template>
+ <slot id="s2" slot="slot3">
+ <slot id="s1" name=slot1></slot>
+ </slot>
+ </div>
+ </template>
+ <div id="c1" slot="slot1"></div>
+ </div>
+</div>
+
+<script>
+async_test((test) => {
+ let n = createTestTree(test7);
+ removeWhiteSpaceOnlyTextNodes(n.test7);
+
+ document.body.offsetLeft;
+ doneIfSlotChange([n.s1, n.s2, n.s3], test);
+
+ n.c1.remove();
+}, "slotchange event: Fallback slot's parant slot is assinged to another slot.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698