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

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

Issue 1604853004: Rename slot.getDistributedNodes() to slot.getAssingedNodes({flatten: true}). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor Created 4 years, 11 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/fast/dom/shadow/v1-slots-dom-mutation.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-dom-mutation.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-dom-mutation.html
index 5757aa011f4d7831167a85936b48d7c47ad502ea..bc5c47a439a8ca1643bffdb07f52e2ebf75b17ec 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-dom-mutation.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-dom-mutation.html
@@ -25,8 +25,8 @@ const fallback1 = host.shadowRoot.querySelector('#fallback1');
const fallback2 = host.shadowRoot.querySelector('#fallback2');
test(() => {
- assert_array_equals(slot1.getDistributedNodes(), [child1]);
- assert_array_equals(slot2.getDistributedNodes(), [fallback2]);
+ assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]);
+ assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]);
}, "Slot's distributed nodes");
test(() => {
@@ -35,24 +35,24 @@ test(() => {
slot0.setAttribute('name', 'slot1');
host.shadowRoot.insertBefore(slot0, slot1);
- assert_array_equals(slot0.getDistributedNodes(), [child1]);
- assert_array_equals(slot1.getDistributedNodes(), [fallback1]);
- assert_array_equals(slot2.getDistributedNodes(), [fallback2]);
+ assert_array_equals(slot0.getAssignedNodes({flatten: true}), [child1]);
+ assert_array_equals(slot1.getAssignedNodes({flatten: true}), [fallback1]);
+ assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]);
// Remove
host.shadowRoot.removeChild(slot0);
- assert_array_equals(slot1.getDistributedNodes(), [child1]);
- assert_array_equals(slot2.getDistributedNodes(), [fallback2]);
+ assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]);
+ assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]);
}, "Slot's distributed nodes after inserting/removeing a slot.");
test(() => {
// Attribute change
slot1.setAttribute('name', 'slot-foo');
- assert_array_equals(slot1.getDistributedNodes(), [fallback1]);
- assert_array_equals(slot2.getDistributedNodes(), [fallback2]);
+ assert_array_equals(slot1.getAssignedNodes({flatten: true}), [fallback1]);
+ assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]);
child1.setAttribute('slot', 'slot-foo');
- assert_array_equals(slot1.getDistributedNodes(), [child1]);
- assert_array_equals(slot2.getDistributedNodes(), [fallback2]);
+ assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]);
+ assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]);
}, "Slot's distributed nodes after the attribute is changed.");
</script>

Powered by Google App Engine
This is Rietveld 408576698