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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html

Issue 1671823002: Restrict the types of nodes that could be assigned to a slot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 10 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/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html
index 979c61cee3f490ab10feeed42d38302a8d01ee2b..5659d495aa8890008bc3e6ec0760395ce66b48a7 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-text-nodes.html
@@ -14,6 +14,7 @@
<div id='child2'></div>
World
<div id='child3' slot='nonexistent'></div>
+ <!-- comment node -->
</div>
<script>
'use strict';
@@ -28,12 +29,16 @@ const shadowChild2 = host.shadowRoot.querySelector('#shadow-child2');
const textHello = host.childNodes[1];
const textWorld = host.childNodes[3];
+const commentNode = child3.nextSibling;
test(() => {
assert_equals(textHello.nodeValue.trim(), 'Hello');
assert_equals(textWorld.nodeValue.trim(), 'World');
+ assert_equals(commentNode.nodeType, Node.COMMENT_NODE);
+
assert_equals(textHello.assignedSlot, defaultSlot);
assert_equals(textWorld.assignedSlot, defaultSlot);
+ assert_equals(commentNode.assignedSlot, undefined, "Comment Node does not define assignedSlot");
assert_equals(child1.assignedSlot, slot1);
assert_equals(child2.assignedSlot, defaultSlot);
assert_equals(child3.assignedSlot, null);
@@ -42,7 +47,7 @@ test(() => {
test(() => {
assert_array_equals(defaultSlot.getAssignedNodes({flatten: true}), [textHello, child2, textWorld]);
assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]);
-}, "getDistributedNodes");
+}, "getAssignedNodes");
add_completion_callback(() => {
if (window.testRunner)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698