blob: 92898b27102d7ebd448a775e85b104a7f166c13a [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true ] -->
<html>
<head>
<meta name="viewport">
<style>
body, html {
margin: 0;
width: 100%;
height: 100%;
}
#bar {
width: 1000px;
height: 100px;
background: linear-gradient(to right, red 0%, green 50%, blue 100%);
}
#description {
width: 300px;
overflow: scroll;
}
</style>
<script src="../../../resources/ui-helper.js"></script>
<script src="../../../resources/js-test.js"></script>
<script>
jsTestIsAsync = true;
description("This test verifies that a page with a no viewport but with content larger than the actual view width is scaled to fit the view. To test manually, load the page and verify that the bar spans the full width of the page.");
addEventListener("load", async () => {
if (!window.testRunner)
return;
await UIHelper.ensurePresentationUpdate();
minScale = (await UIHelper.minimumZoomScale()).toFixed(2);
expectedScale = (screen.width / 1000).toFixed(2);
shouldBe("minScale", "expectedScale");
shouldBecomeEqual("innerWidth", "1000", finishJSTest);
});
</script>
</head>
<body>
<div id="bar"></div>
<div id="description"></div>
</body>
</html>