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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/slots-api-2.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-2.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/slots-api-2.html b/third_party/WebKit/LayoutTests/shadow-dom/slots-api-2.html
deleted file mode 100644
index 9dc60fd1f5930283d9dd725eaf873474198953b6..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/shadow-dom/slots-api-2.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<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="open">
- <div id="d1_1">
- <template data-mode="open">
- <div id="d1_1_1"></div>
- <slot id="d1_1_s1" name="d1_1_s1"></slot>
- <slot id="d1_1_s2" name="d1_1_s2"></slot>
- <div id="d1_1_2"></div>
- </template>
- <div id="d1_2"></div>
- <slot id="d1_s0"></slot>
- <slot id="d1_s1" name="d1_s1" slot="d1_1_s1"></slot>
- <slot id="d1_s2" name="d1_s2"></slot>
- <div id="d1_3"></div>
- <div id="d1_4" slot="d1_1_s1"></div>
- </div>
- </template>
- <div id="d2" slot="d1_s1"></div>
- <div id="d3" slot="d1_s2"></div>
- <div id="d4" slot="non_existent"></div>
- <div id="d5"></div>
-</div>
-<script>
-'use strict';
-
-let n = createTestTree(d1);
-removeWhiteSpaceOnlyTextNodes(n.d1);
-
-test(() => {
- assert_equals(n.d1.assignedSlot, null);
- assert_equals(n.d2.assignedSlot, n.d1_s1);
- assert_equals(n.d3.assignedSlot, n.d1_s2);
- assert_equals(n.d4.assignedSlot, null);
- assert_equals(n.d5.assignedSlot, n.d1_s0);
-
- assert_equals(n.d1_2.assignedSlot, null);
- assert_equals(n.d1_s0.assignedSlot, null);
- assert_equals(n.d1_s1.assignedSlot, n.d1_1_s1);
- assert_equals(n.d1_s2.assignedSlot, null);
- assert_equals(n.d1_3.assignedSlot, null);
- assert_equals(n.d1_4.assignedSlot, n.d1_1_s1);
-}, "assignedSlot");
-
-test(() => {
- assert_array_equals(n.d1_s0.assignedNodes(), [n.d5]);
- 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_s1, n.d1_4]);
- assert_array_equals(n.d1_1_s2.assignedNodes(), []);
-}, "assignedNodes");
-
-test(() => {
- assert_array_equals(n.d1_1_s1.assignedNodes({flatten: false}), [n.d1_s1, n.d1_4],
- "{flatten: false} should not have any effect");
-}, "assignedNodes({flatten: false})");
-
-test(() => {
- assert_array_equals(n.d1_s0.assignedNodes({flatten: true}), [n.d5]);
- 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.d2, n.d1_4]);
- assert_array_equals(n.d1_1_s1.assignedNodes({flatten: true}), [n.d2, n.d1_4]);
- assert_array_equals(n.d1_1_s2.assignedNodes({flatten: true}), []);
-}, "assignedNodes({flatten: true})");
-</script>

Powered by Google App Engine
This is Rietveld 408576698