blob: 850b413fb45a8b82716607d8c5ac56439c0c18c3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Viewport 'width' descriptor has 'extend-to-zoom' value</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
html, body { width: 100%; height: 100%; margin: 0 }
@viewport { width: -internal-extend-to-zoom; zoom: 0.5; }
</style>
</head>
<body>
<div id="log"></div>
<script>
test(function(){
assert_true(window.internals instanceof Object);
}, "Check that window.internals is present. Required to call viewportAsText.");
var actualWidth;
var actualHeight;
var vpString = internals.viewportAsText(document, 1, 320, 352);
var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
if (match) {
actualWidth = parseFloat(match[1]);
}
test(function(){
assert_equals(actualWidth, 640);
}, "Check viewport width.");
</script>
</body>
</html>