blob: f473db23f492392258a70e5a22cb6d162e49d8b1 [file] [log] [blame]
<body>
<script src="full-screen-test.js"></script>
<span></span>
<script>
// Bail out early if the full screen API is not enabled or is missing:
if (Element.prototype.webkitRequestFullScreen == undefined) {
logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
endTest();
} else {
var callback;
var fullscreenChanged = function(event)
{
if (callback)
callback(event)
};
waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
var span = document.getElementsByTagName('span')[0];
var spanEnteredFullScreen = function() {
testExpected("document.webkitCurrentFullScreenElement", span);
callback = documentEnteredFullScreen;
runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
};
var documentEnteredFullScreen = function() {
testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
callback = null;
endTest();
};
callback = spanEnteredFullScreen;
runWithKeyDown(function(){span.webkitRequestFullScreen()});
}
</script>