2 <title>Mixed prefixed and unprefixed requests
</title>
3 <script src=
"full-screen-test.js"></script>
4 <div><span></span></div>
7 function fullscreenChanged(event
)
12 waitForEvent(document
, "fullscreenchange", fullscreenChanged
);
13 waitForEvent(document
, "webkitfullscreenchange", fullscreenChanged
);
15 var div
= document
.querySelector("div");
16 var span
= document
.querySelector("span");
18 function divEnteredFullscreen()
20 testExpected("document.fullscreenElement", div
);
21 testExpected("document.webkitFullscreenElement", div
);
22 callback
= spanEnteredFullscreen
;
23 runWithKeyDown(function() { span
.requestFullscreen(); });
26 function spanEnteredFullscreen()
28 testExpected("document.fullscreenElement", span
);
29 testExpected("document.webkitFullscreenElement", span
);
30 callback
= spanExitedFullscreen
;
31 document
.webkitExitFullscreen();
34 function spanExitedFullscreen()
36 testExpected("document.fullscreenElement", div
);
37 testExpected("document.webkitFullscreenElement", div
);
38 callback
= divExitedFullscreen
;
39 document
.webkitExitFullscreen();
42 function divExitedFullscreen()
44 testExpected("document.fullscreenElement", null);
45 testExpected("document.webkitFullscreenElement", null);
49 callback
= divEnteredFullscreen
;
50 runWithKeyDown(function() { div
.webkitRequestFullscreen(); });