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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-pseudo-element.html

Issue 2843883002: Remove, or rewrite if necessary, tests which use /deep/ or ::shadow (Closed)
Patch Set: rev Created 3 years, 8 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/shadow-pseudo-element.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-pseudo-element.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-pseudo-element.html
deleted file mode 100644
index c2db5598df48a2b225873dab9aed32c929fed4c4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-pseudo-element.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<script src="resources/shadow-dom.js"></script>
-<script src="../../../resources/js-test.js"></script>
-<body>
- <div id='sandbox'></div>
-</body>
-<script>
-function colorOf(node)
-{
- return document.defaultView.getComputedStyle(node, null).getPropertyValue('color');
-}
-
-function colorShouldBe(selector, color)
-{
- var text = 'colorOf(getNodeInComposedTree("' + selector + '"))';
- shouldBeEqualToString(text, color);
-}
-
-function colorShouldNotBe(selector, color)
-{
- var text = 'colorOf(getNodeInComposedTree("' + selector + '"))';
- var unevaledString = '"' + color.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"';
- shouldNotBe(text, unevaledString);
-}
-
-function cleanUp()
-{
- document.getElementById('sandbox').innerHTML = '';
-}
-
-description('Test for ::shadow pseudo element, http://crbug.com/367266.');
-
-sandbox.appendChild(
- createDOM('div', {},
- createDOM('style', {'id': 'style-with-shadow'},
- document.createTextNode('div::shadow { color: red; }')),
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'target'},
- document.createTextNode('not red color.'))))));
-
-colorShouldNotBe('host/target', 'rgb(255, 0, 0)');
-
-var styleWithShadow = document.getElementById('style-with-shadow');
-styleWithShadow.innerHTML = ':not(div::shadow) { color: red; }';
-
-colorShouldNotBe('host/target', 'rgb(255, 0, 0)');
-
-styleWithShadow.innerHTML = ':-webkit-any(div::shadow, div::shadow div) { color: red; }';
-
-colorShouldNotBe('host/target', 'rgb(255, 0, 0)');
-
-cleanUp();
-
-sandbox.appendChild(
- createDOM('div', {},
- createDOM('style', {},
- document.createTextNode('div::shadow + div { color: red; }')),
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'first-direct-child'},
- document.createTextNode('not red color.')),
- createDOM('div', {'id': 'second-direct-child'},
- document.createTextNode('not red color.')))),
- createDOM('div', {'id': 'host-sibling'},
- document.createTextNode('not red color.'))));
-
-colorShouldNotBe('host/first-direct-child', 'rgb(255, 0, 0)');
-colorShouldNotBe('host/second-direct-child', 'rgb(255, 0, 0)');
-colorShouldNotBe('host-sibling', 'rgb(255, 0, 0)');
-
-cleanUp();
-
-sandbox.appendChild(
- createDOM('div', {},
- createDOM('style', {},
- document.createTextNode('div::shadow ~ div { color: red; }')),
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'first-direct-child'},
- document.createTextNode('not red color.')),
- createDOM('div', {'id': 'second-direct-child'},
- document.createTextNode('not red color.')))),
- createDOM('div', {'id': 'host-sibling'},
- document.createTextNode('not red color.'))));
-
-colorShouldNotBe('host/first-direct-child', 'rgb(255, 0, 0)');
-colorShouldNotBe('host/second-direct-child', 'rgb(255, 0, 0)');
-colorShouldNotBe('host-sibling', 'rgb(255, 0, 0)');
-
-cleanUp();
-
-sandbox.appendChild(
- createDOM('div', {},
- createDOM('style', {},
- document.createTextNode('div::shadow > div { color: green; }')),
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'direct-child'},
- document.createTextNode('green color.')),
- createDOM('p', {},
- createDOM('div', {'id': 'not-direct-child'},
- document.createTextNode('not green color.'))))),
- createDOM('div', {'id': 'host-child'},
- document.createTextNode('not green color.'))));
-
-colorShouldBe('host/direct-child', 'rgb(0, 128, 0)');
-colorShouldNotBe('host/not-direct-child', 'rgb(0, 128, 0)');
-colorShouldNotBe('host-child', 'rgb(0, 128, 0)');
-
-cleanUp();
-
-</script>
-
-

Powered by Google App Engine
This is Rietveld 408576698