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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any.html

Issue 2284633002: Allow multiple type and id selectors in invalidation set features. (Closed)
Patch Set: Unit tests 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any.html
new file mode 100644
index 0000000000000000000000000000000000000000..d6949bc764423322585034ed8c4c3f7e27094101
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+ .t1 :-webkit-any(span, div) { color: green; }
+ .t2 :-webkit-any(#x1, #x2) { color: green; }
+</style>
+<p>Both elements below should be green.</p>
+<div id="t1">
+ <div>Green</div>
+ <span>Green</span>
+</div>
+<div id="t2">
+ <div id="x1">Green</div>
+ <div id="x2">Green</div>
+</div>
+<script>
+ document.body.offsetTop;
+
+ test(() => {
+ assert_equals(getComputedStyle(t1.querySelector("div")).color, "rgb(0, 0, 0)");
+ assert_equals(getComputedStyle(t1.querySelector("span")).color, "rgb(0, 0, 0)");
+ assert_equals(getComputedStyle(x1).color, "rgb(0, 0, 0)");
+ assert_equals(getComputedStyle(x2).color, "rgb(0, 0, 0)");
+ }, "Preconditions.");
+
+ test(() => {
+ t1.className = "t1";
+ assert_equals(getComputedStyle(t1.querySelector("div")).color, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(t1.querySelector("span")).color, "rgb(0, 128, 0)");
+ }, "Invalidate two type selectors.");
+
+ test(() => {
+ t2.className = "t2";
+ assert_equals(getComputedStyle(x1).color, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(x2).color, "rgb(0, 128, 0)");
+ }, "Invalidate two id selectors.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698