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

Side by Side 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, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <style>
5 .t1 :-webkit-any(span, div) { color: green; }
6 .t2 :-webkit-any(#x1, #x2) { color: green; }
7 </style>
8 <p>Both elements below should be green.</p>
9 <div id="t1">
10 <div>Green</div>
11 <span>Green</span>
12 </div>
13 <div id="t2">
14 <div id="x1">Green</div>
15 <div id="x2">Green</div>
16 </div>
17 <script>
18 document.body.offsetTop;
19
20 test(() => {
21 assert_equals(getComputedStyle(t1.querySelector("div")).color, "rgb(0, 0 , 0)");
22 assert_equals(getComputedStyle(t1.querySelector("span")).color, "rgb(0, 0, 0)");
23 assert_equals(getComputedStyle(x1).color, "rgb(0, 0, 0)");
24 assert_equals(getComputedStyle(x2).color, "rgb(0, 0, 0)");
25 }, "Preconditions.");
26
27 test(() => {
28 t1.className = "t1";
29 assert_equals(getComputedStyle(t1.querySelector("div")).color, "rgb(0, 1 28, 0)");
30 assert_equals(getComputedStyle(t1.querySelector("span")).color, "rgb(0, 128, 0)");
31 }, "Invalidate two type selectors.");
32
33 test(() => {
34 t2.className = "t2";
35 assert_equals(getComputedStyle(x1).color, "rgb(0, 128, 0)");
36 assert_equals(getComputedStyle(x2).color, "rgb(0, 128, 0)");
37 }, "Invalidate two id selectors.");
38 </script>
OLDNEW
« 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