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

Unified Diff: LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-content-combinator.html

Issue 187353003: Implement /content/ combinator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 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: LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-content-combinator.html
diff --git a/LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-pseudo-content.html b/LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-content-combinator.html
similarity index 53%
rename from LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-pseudo-content.html
rename to LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-content-combinator.html
index 3613347f881543c2bfc1699e0918b5a38d8a75ec..b82c30ffb84ead73fd10932ecfa7e7a4d282640a 100644
--- a/LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-pseudo-content.html
+++ b/LayoutTests/fast/dom/shadow/no-style-sharing-with-uncommon-attribute-and-content-combinator.html
@@ -1,20 +1,22 @@
<!doctype html>
<html>
<head>
+<script src="../../../resources/js-test.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
+var shadow;
+
function runTest() {
- var shadow = host.createShadowRoot();
- shadow.applyAuthorStyles = false;
+ shadow = host.createShadowRoot();
shadow.innerHTML = "<div id='hostInShadow'><div class='parent'><p ishidden='false'>NotHidden</p><p ishidden='true' id='target'>Hidden</p></div></div>";
var innerShadow = shadow.getElementById('hostInShadow').createShadowRoot();
- innerShadow.applyAuthorStyles = false;
- innerShadow.innerHTML = "<style>content::content .parent [ishidden=true] { display: none; }</style><content>";
-
+ innerShadow.innerHTML = "<style>content /content/ .parent [ishidden=true] { display: none; }</style><content>";
window.setTimeout(function() {
+ shouldBe('window.getComputedStyle(shadow.querySelector("#hostInShadow > .parent > p[isHidden=false]")).display', '"block"');
+ shouldBe('window.getComputedStyle(shadow.querySelector("#hostInShadow > .parent > p[isHidden=true]")).display', '"none"');
if (window.testRunner)
testRunner.notifyDone();
}, 0);

Powered by Google App Engine
This is Rietveld 408576698