blob: 9d6aff9f03cf7e0d546060675df2ce98c1bb8f72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<!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) {
// FIXME: Emulate the android viewport UA stylesheet. We should test this
// based on the platform we're building for
testRunner.injectStyleSheet("@viewport {min-width: 980px}", true);
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(){
assert_equals(document.body.offsetWidth, 980);
}, "Check that we get a viewport width of 980px from the user agent stylesheet.");
</script>
</body>
</html>
|