2 <script src=
"full-screen-test.js"></script>
3 <p>Test that webkitCancelFullScreen only exits one level of fullscreen
</p>
4 <div><span></span></div>
7 function fullscreenChanged(event
)
12 waitForEvent(document
, "webkitfullscreenchange", fullscreenChanged
);
14 var div
= document
.querySelector("div");
15 function divEnteredFullScreen()
17 testExpected("document.webkitCurrentFullScreenElement", div
);
18 callback
= spanEnteredFullScreen
;
19 runWithKeyDown(function() { span
.webkitRequestFullScreen(); });
22 var span
= document
.querySelector("span");
23 function spanEnteredFullScreen()
25 testExpected("document.webkitCurrentFullScreenElement", span
);
26 callback
= cancelledFullScreen
;
27 document
.webkitCancelFullScreen();
30 function cancelledFullScreen()
32 testExpected("document.webkitCurrentFullScreenElement", div
);
36 callback
= divEnteredFullScreen
;
37 runWithKeyDown(function() { div
.webkitRequestFullScreen(); });