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

Side by Side Diff: LayoutTests/fast/css/invalidation/webkit-any-universal.html

Issue 383833002: All selectors in :-webkit-any must have an invalidation set feature. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid eventSender Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/RuleFeature.cpp » ('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(*, .dummy),
6 .t2 :-webkit-any(:-webkit-any(.dummy, *), .dummy),
7 .t3 :-webkit-any(:focus, dummy) { background-color: rgb(0, 128, 0); }
8
9 #r3 { width: 10px; height: 10px }
10 </style>
11 <div id="t1">
12 <div id="r1"></div>
13 </div>
14 <div id="t2">
15 <div id="r2"></div>
16 </div>
17 <div id="t3">
18 <div id="r3" tabIndex="1"></div>
19 </div>
20 <script>
21 document.body.offsetTop;
22
23 test(function() {
24 assert_true(!!window.internals, "This test only works with internals exposed present");
25 assert_equals(getComputedStyle(r1).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
26
27 t1.className = "t1";
28 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc");
29 assert_equals(getComputedStyle(r1).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
30 }, ":-webkit-any() with universal selector");
31
32 test(function() {
33 assert_true(!!window.internals, "This test only works with internals exposed present");
34 assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
35
36 t2.className = "t2";
37 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc");
38 assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
39 }, "Nested :-webkit-any() with universal selector");
40
41 test(function() {
42 assert_true(!!window.internals, "This test only works with internals exposed present");
43
44 r3.focus();
45 assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
46
47 t3.className = "t3";
48 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc");
49 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
50 }, ":-webkit-any() with universal :focus selector");
51 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698