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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/slots-api-with-closed-shadow-tree.html

Issue 2060793002: Rewrite tests for slots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@events-related
Patch Set: fixed Created 4 years, 6 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/shadow-dom/slots-api-with-closed-shadow-tree.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/slots-api-with-closed-shadow-tree.html b/third_party/WebKit/LayoutTests/shadow-dom/slots-api-with-closed-shadow-tree.html
deleted file mode 100644
index 94f5c6867cd5581a9c0cec5f640dca3e0edabb85..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/shadow-dom/slots-api-with-closed-shadow-tree.html
+++ /dev/null
@@ -1,48 +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="d1">
- <template data-mode="closed">
- <div id="d1_1">
- <template data-mode="open">
- <slot id="d1_1_s1" name="d1_1_s1"></slot>
- </template>
- <div id="d1_2" slot="d1_1_s1"></div>
- <slot id="d1_s1" name="d1_s1" slot="d1_1_s1"></slot>
- <slot id="d1_s2" name="d1_s2"></slot>
- </div>
- </template>
- <div id="d2" slot="d1_s1"></div>
- <div id="d3" slot="d1_s2"></div>
-</div>
-<script>
-'use strict';
-
-let n = createTestTree(d1);
-removeWhiteSpaceOnlyTextNodes(n.d1);
-
-test(() => {
- assert_equals(n.d1.assignedSlot, null);
- assert_equals(n.d2.assignedSlot, null);
- assert_equals(n.d3.assignedSlot, null);
-}, 'A slot in a closed shadow tree should not be accessed via assignedSlot');
-
-test(() => {
- assert_equals(n.d1_2.assignedSlot, n.d1_1_s1);
- assert_equals(n.d1_s1.assignedSlot, n.d1_1_s1);
- assert_equals(n.d1_s2.assignedSlot, null);
-}, 'A slot in an open shadow tree should be accessed via assignedSlot from a closed shadow tree');
-
-test(() => {
- assert_array_equals(n.d1_s1.assignedNodes(), [n.d2]);
- assert_array_equals(n.d1_s2.assignedNodes(), [n.d3]);
- assert_array_equals(n.d1_1_s1.assignedNodes(), [n.d1_2, n.d1_s1]);
-}, 'A closed shadow tree has nothing to do with the behavior of assignedNodes');
-
-test(() => {
- assert_array_equals(n.d1_s1.assignedNodes({flatten: true}), [n.d2]);
- assert_array_equals(n.d1_s2.assignedNodes({flatten: true}), [n.d3]);
- assert_array_equals(n.d1_1_s1.assignedNodes({flatten: true}), [n.d1_2, n.d2]);
-}, 'A closed shadow tree has nothing to do with the behavior of assignedNodes({flatten: true}}');
-</script>

Powered by Google App Engine
This is Rietveld 408576698