3 var runPixelTests
= true;
4 var init = function() {
6 var fullscreenChanged = function(event
)
11 document
.onwebkitfullscreenchange
= fullscreenChanged
;
13 var one
= document
.getElementById('one');
14 var two
= document
.getElementById('two');
15 var three
= document
.getElementById('three');
17 var threeEnteredFullScreen = function(event
) {
18 if (document
.webkitCurrentFullScreenElement
== three
) {
19 callback
= threeExitedFullScreen
;
24 var threeExitedFullScreen = function(event
) {
25 if (document
.webkitCurrentFullScreenElement
== null) {
31 callback
= threeEnteredFullScreen
;
33 function goFullScreen() {
34 document
.getElementById('three').webkitRequestFullScreen();
36 runWithKeyDown(goFullScreen
);
39 <script src=
"full-screen-test.js"></script>
42 border:
4px solid darkgreen;
43 background-color: green;
50 border:
4px solid darkred;
51 background-color: red;
57 border:
4px solid darkblue;
58 background-color: blue;
62 :-webkit-full-screen-ancestor {
63 background-color: yellow;
67 <body onload=
"init()">
69 This tests that, if the ancestor of the current full-screen element is removed, full screen mode will exit, and the document will render normally. At the completion of the test, a green box should be visible. Click
<button onclick=
"goFullScreen()">go full screen
</button> to run the test.
73 <div id=
"three"></div>