2 <script src=
"../../../resources/testharness.js"></script>
3 <script src=
"../../../resources/testharnessreport.js"></script>
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); }
9 #r3 { width:
10px; height:
10px }
18 <div id=
"r3" tabIndex=
"1"></div>
21 document
.body
.offsetTop
;
24 assert_true(!!window
.internals
, "This test only works with internals exposed present");
25 }, "internals are exposed");
28 assert_equals(getComputedStyle(r1
).backgroundColor
, "rgba(0, 0, 0, 0)", "Background color should initially be transparent");
31 assert_equals(internals
.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc");
32 assert_equals(getComputedStyle(r1
).backgroundColor
, "rgb(0, 128, 0)", "Background color is green after class change");
33 }, ":-webkit-any() with universal selector");
36 assert_equals(getComputedStyle(r2
).backgroundColor
, "rgba(0, 0, 0, 0)", "Background color should initially be transparent");
39 assert_equals(internals
.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc");
40 assert_equals(getComputedStyle(r2
).backgroundColor
, "rgb(0, 128, 0)", "Background color is green after class change");
41 }, "Nested :-webkit-any() with universal selector");
45 assert_equals(getComputedStyle(r3
).backgroundColor
, "rgba(0, 0, 0, 0)", "Background color should initially be transparent");
48 assert_equals(internals
.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc");
49 assert_equals(getComputedStyle(r3
).backgroundColor
, "rgb(0, 128, 0)", "Background color is green after class change");
50 }, ":-webkit-any() with universal :focus selector");