blob: f27004a4dc1126c27509496341082602602133ba [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<script>
if (window.internals)
internals.settings.setViewportFitEnabled(true);
</script>
<meta name="viewport" content="initial-scale=1, viewport-fit=auto">
<script src="resources/viewport-test-utils.js"></script>
<script>
function getSafeAreaUIScript()
{
return `
(function() {
uiController.setSafeAreaInsets(10, 20, 30, 40);
uiController.doAfterVisibleContentRectUpdate(function () {
uiController.uiScriptComplete();
})
})();`
}
function doTest()
{
testRunner.runUIScript(getSafeAreaUIScript(), function(result) {
document.getElementById('windowSize').textContent = window.innerWidth + " x " + window.innerHeight;
runTest();
});
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<p>Viewport: <span id="viewport"></span></p>
<p>Window Size: <span id="windowSize"></span></p>
<div id="result"></div>
</body>
</html>