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

Unified Diff: LayoutTests/fast/dom/shadow/pseudo-not-traversal.html

Issue 1129673002: Remove support for pseudo classes in <content select>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix more tests. Created 5 years, 7 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: LayoutTests/fast/dom/shadow/pseudo-not-traversal.html
diff --git a/LayoutTests/fast/dom/shadow/pseudo-not-traversal.html b/LayoutTests/fast/dom/shadow/pseudo-not-traversal.html
deleted file mode 100644
index 516fba5996f6baedc2a4abb1f5b28d6186e4816b..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/dom/shadow/pseudo-not-traversal.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-
-<script src="../../../resources/js-test.js"></script>
-
-<template id="item">
- <div id="host1">
- <span class="a">First</span>
- <span class="b">Second</span>
- </div>
-</template>
-
-<template id="host1-shadow">
- <div id="host2">
- <content select=".b"></content>
- <content select=".a"></content>
- </div>
-</template>
-
-<template id="host2-shadow">
- <content id="target"></content>
-</template>
-
-<script>
-// Creates the host/shadow templates described above which swap the nodes
-// using distribution and then returns a string list of the classes of the
-// elements that were distributed in order.
-function testSelector(select) {
- var host1 = document.getElementById("item").content.firstElementChild.cloneNode(true);
- var template1 = document.getElementById("host1-shadow").content;
- host1.createShadowRoot().appendChild(template1.cloneNode(true));
-
- var host2 = host1.shadowRoot.getElementById("host2");
- var template2 = document.getElementById("host2-shadow").content;
- host2.createShadowRoot().appendChild(template2.cloneNode(true));
-
- var target = host2.shadowRoot.getElementById("target");
- target.select = select;
-
- var result = [];
- var nodes = target.getDistributedNodes();
- for (var i = 0; i < nodes.length; ++i)
- result.push(nodes[i].className);
-
- return result.join(",");
-}
-
-description("Test the :not pseudo selector in <content select>");
-
-shouldBeEqualToString("testSelector('span')", "b,a");
-shouldBeEqualToString("testSelector(':nth-child(1)')", "b");
-shouldBeEqualToString("testSelector(':nth-child(2)')", "a");
-shouldBeEqualToString("testSelector(':not(:nth-child(1))')", "a");
-shouldBeEqualToString("testSelector(':not(:nth-child(2))')", "b");
-</script>

Powered by Google App Engine
This is Rietveld 408576698