2 <script src=
"../../../resources/js-test.js"></script>
8 .t1 #full:-webkit-full-screen,
9 .t2 #ancestor:-webkit-full-screen-ancestor {
10 background-color: green;
24 description("Test that descendant invalidation works with fullscreen pseudo classes.");
26 window
.jsTestIsAsync
= true;
28 var red
= "rgb(255, 0, 0)";
29 var green
= "rgb(0, 128, 0)";
33 shouldBe("getComputedStyle(full).backgroundColor", "red");
34 testRoot
.offsetTop
; // force recalc
35 testRoot
.className
= "t1";
37 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
38 shouldBe("getComputedStyle(full).backgroundColor", "green");
40 shouldBe("getComputedStyle(ancestor).backgroundColor", "red");
41 testRoot
.offsetTop
; // force recalc
42 testRoot
.className
+= " t2";
44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
45 shouldBe("getComputedStyle(ancestor).backgroundColor", "green");
50 if (window
.testRunner
)
51 testRunner
.waitUntilDone();
53 document
.addEventListener("keypress", function(){
54 document
.getElementById("full").webkitRequestFullScreen();
57 document
.addEventListener("webkitfullscreenchange", function(){
61 if (window
.eventSender
)
62 eventSender
.keyDown(" ");