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

Unified Diff: LayoutTests/fast/css/invalidation/targeted-class-custom-pseudo.html

Issue 219193004: Custom pseudo element types as an invalidation set feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/css/invalidation/targeted-class-custom-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/targeted-class-custom-pseudo.html b/LayoutTests/fast/css/invalidation/targeted-class-custom-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..0395152473f4853e7d52957f5476d520f23262d5
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/targeted-class-custom-pseudo.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.theme ::-webkit-file-upload-button { background-color: green }
+</style>
+<div id="t">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <input type="file"></input>
+</div>
+<script>
+description("Check that targeted class invalidation works for custom pseudo elements.");
+
+shouldBeTrue("!!window.internals");
+
+if (window.internals) {
+ var gray = "rgb(192, 192, 192)";
+ var green = "rgb(0, 128, 0)";
+
+ fileUploadButton = internals.shadowRoot(document.querySelector("input")).firstChild;
+
+ shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "gray");
+
+ document.body.offsetLeft; // force style recalc.
+
+ document.getElementById("t").className = "theme";
+
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+ shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "green");
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698