2 <script src=
"full-screen-test.js"></script>
5 var span
= document
.getElementsByTagName('span')[0];
7 var documentEnteredFullScreen = function() {
8 testExpected("document.webkitCurrentFullScreenElement", document
.documentElement
);
9 runWithKeyDown(function(){span
.webkitRequestFullscreen()});
10 waitForEvent(document
, 'webkitfullscreenchange', spanEnteredFullScreen
, false, true);
13 var spanEnteredFullScreen = function() {
14 testExpected("document.webkitCurrentFullScreenElement", span
);
15 waitForEvent(document
, 'webkitfullscreenchange', spanExited
, false, true);
16 document
.webkitExitFullscreen();
19 var spanExited = function() {
20 testExpected("document.webkitCurrentFullScreenElement", document
.documentElement
);
21 waitForEvent(document
, 'webkitfullscreenchange', documentExited
, false, true);
22 document
.webkitExitFullscreen();
25 var documentExited = function() {
26 testExpected("document.webkitCurrentFullScreenElement", undefined);
30 runWithKeyDown(function(){document
.documentElement
.webkitRequestFullscreen()});
31 waitForEvent(document
, 'webkitfullscreenchange', documentEnteredFullScreen
, false, true);