2013-07-18 15:44:12 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
var testFrame;
|
|
|
|
var testDiv;
|
|
|
|
|
|
|
|
function runTest() {
|
|
|
|
testFrame = document.getElementById('fullscreenFrame');
|
|
|
|
testDiv = testFrame.contentWindow.document.getElementById('testDiv');
|
2013-07-05 21:28:23 +00:00
|
|
|
// 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 {
|
|
|
|
// Test if the iframe expands full screen when max-width/max-height are set.
|
2013-07-18 15:44:12 +00:00
|
|
|
waitForEventTestAndEnd(document, 'webkitfullscreenchange', "testFrame.getBoundingClientRect().right == document.body.getBoundingClientRect().right && testFrame.getBoundingClientRect().bottom == document.body.getBoundingClientRect().bottom");
|
2013-07-05 21:28:23 +00:00
|
|
|
runWithKeyDown(function(){ testDiv.webkitRequestFullScreen(); });
|
|
|
|
}
|
2013-07-18 15:44:12 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src='full-screen-test.js'></script>
|
|
|
|
</head>
|
|
|
|
<body style="margin: 0px;">
|
|
|
|
<iframe onload='runTest();' id='fullscreenFrame' src='data:text/html,<div id="testDiv">test</div>' style='max-width: 10px; max-height: 10px;' frameborder='0' webkitallowfullscreen></iframe>
|
2013-07-05 21:28:23 +00:00
|
|
|
</body>
|