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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html

Issue 2266353004: Make Document::styleForElementIgnoringPendingStyleSheets() be aware of a flat tree structure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update the test Created 4 years, 4 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/css/getComputedStyle/computed-style-redistribution.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
index ce3e73de39624eae173c943b58d0c73f3076e690..387bcb4b70ab6149d57ab3d185b73f8782361430 100644
--- a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
@@ -10,8 +10,8 @@ custom-element { color: red }
<script>
description("Check that getComputedStyle causes a shadow re-distribution when necessary.");
-var red = "rgb(255, 0, 0)";
var green = "rgb(0, 128, 0)";
+var white = "rgb(0, 0, 0)";
var custom = document.querySelector("custom-element");
var shadowRoot = custom.createShadowRoot();
@@ -20,14 +20,12 @@ shadowRoot.innerHTML = '<style>::content div { color: green; }</style><content s
var d1 = document.querySelector(".d1");
var d2 = document.querySelector(".d2");
-shouldBe("getComputedStyle(d1).color", "red");
+shouldBe("getComputedStyle(d1).color", "white");
shouldBe("getComputedStyle(d2).color", "green");
-document.body.offsetTop;
-
shadowRoot.querySelector("content").setAttribute("select", ".d1");
shouldBe("getComputedStyle(d1).color", "green");
-shouldBe("getComputedStyle(d2).color", "red");
+shouldBe("getComputedStyle(d2).color", "white");
</script>

Powered by Google App Engine
This is Rietveld 408576698