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

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

Issue 1774113002: Move Shadow DOM V1 tests from fast/dom/shadow to shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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-api-1.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-1.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-1.html
deleted file mode 100644
index 17f927e0aef480e9de6f2c5a09fe6eb80c6560b2..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-1.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<script src='../../../resources/testharness.js'></script>
-<script src='../../../resources/testharnessreport.js'></script>
-<script src='resources/shadow-dom.js'></script>
-<div id='host'>
- <template data-mode='open'>
- <slot name='slot1'></slot>
- <slot name='slot2'></slot>
- <slot name='slot3'></slot>
- </template>
- <div id='child1' slot='slot1'></div>
- <div id='child2' slot='slot1'></div>
- <div id='child3' slot='slot2'></div>
- <div id='child4' slot='nonexistent'></div>
-</div>
-<script>
-'use strict';
-convertTemplatesToShadowRootsWithin(host);
-removeWhiteSpaceOnlyTextNodes(host);
-document.body.offsetLeft;
-
-const slot1 = host.shadowRoot.querySelector('[name=slot1]');
-const slot2 = host.shadowRoot.querySelector('[name=slot2]');
-const slot3 = host.shadowRoot.querySelector('[name=slot3]');
-
-test(() => {
- assert_equals(host.assignedSlot, null);
- assert_equals(child1.assignedSlot, slot1);
- assert_equals(child2.assignedSlot, slot1);
- assert_equals(child3.assignedSlot, slot2);
- assert_equals(child4.assignedSlot, null);
-}, "assignedSlot");
-
-test(() => {
- assert_array_equals(slot1.getAssignedNodes(), [child1, child2]);
- assert_array_equals(slot2.getAssignedNodes(), [child3]);
- assert_array_equals(slot3.getAssignedNodes(), []);
-}, "getAssignedNodes");
-
-test(() => {
- assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1, child2]);
- assert_array_equals(slot2.getAssignedNodes({flatten: true}), [child3]);
- assert_array_equals(slot3.getAssignedNodes({flatten: true}), []);
-}, "getAssignedNodes({flatten: true})");
-</script>

Powered by Google App Engine
This is Rietveld 408576698