blob: 3fe504c048bc495360431b7aa7a8483a841f3d67 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>@viewport user agent stylesheet</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
if (window.testRunner) {
internals.settings.setViewportEnabled(true);
}
</script>
<style>
html, body { width: 100%; height: 100%; margin: 0 }
</style>
</head>
<body style="overflow: hidden;">
<div id="log"></div>
<script>
test(function(){
internals.settings.setViewportStyle("mobile");
assert_equals(document.body.offsetWidth, 980);
}, "Check that we get a viewport width of 980px from viewportAndroid.css.");
test(function(){
internals.settings.setViewportStyle("television");
assert_equals(document.body.offsetWidth, 1280);
}, "Check that we get a viewport width of 1280px from viewportTelevision.css.");
</script>
</body>
</html>