2 <script src=
"full-screen-test.js"></script>
4 :-webkit-full-screen { background: lime; }
5 :-webkit-full-screen-ancestor { color: blue; }
6 :root:-webkit-full-screen-ancestor { background: red; }
11 var fullscreenChanged = function(event
)
16 waitForEvent(document
, "webkitfullscreenchange", fullscreenChanged
);
18 var span
= document
.getElementsByTagName("span")[0];
20 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
21 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
22 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
24 var documentEnteredFullScreen = function(event
) {
25 testExpected("document.webkitCurrentFullScreenElement", document
.documentElement
);
26 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
27 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
28 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 0)");
29 callback
= spanEnteredFullScreen
;
30 runWithKeyDown(function(){span
.webkitRequestFullScreen()});
33 var spanEnteredFullScreen = function(event
) {
34 testExpected("document.webkitCurrentFullScreenElement", span
);
35 testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
36 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(255, 0, 0)");
37 testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
41 callback
= documentEnteredFullScreen
;
42 runWithKeyDown(function(){document
.documentElement
.webkitRequestFullScreen()});