blob: 8e21f874216c80d2fd8975e55dc70f7d3def639b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<body>
<script src="full-screen-test.js"></script>
<div><span></span></div>
<script>
var callback;
var fullscreenChanged = function(event)
{
if (callback)
callback(event)
};
waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
var span = document.getElementsByTagName('span')[0];
var div = span.parentNode;
var spanEnteredFullScreen = function(event) {
callback = spanExitedFullScreen;
testExpected("document.webkitCurrentFullScreenElement", span);
div.innerHTML = "";
};
var spanExitedFullScreen = function(event) {
callback = null;
testExpected("document.webkitCurrentFullScreenElement", null);
endTest();
};
callback = spanEnteredFullScreen;
runWithKeyDown(function(){span.webkitRequestFullScreen()});
</script>
|