Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / device-adapt / viewport-width-extend-to-zoom.html
blob850b413fb45a8b82716607d8c5ac56439c0c18c3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Viewport 'width' descriptor has 'extend-to-zoom' value</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <style>
8 html, body { width: 100%; height: 100%; margin: 0 }
9 @viewport { width: -internal-extend-to-zoom; zoom: 0.5; }
10 </style>
11 </head>
12 <body>
13 <div id="log"></div>
14 <script>
15 test(function(){
16 assert_true(window.internals instanceof Object);
17 }, "Check that window.internals is present. Required to call viewportAsText.");
19 var actualWidth;
20 var actualHeight;
22 var vpString = internals.viewportAsText(document, 1, 320, 352);
23 var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
25 if (match) {
26 actualWidth = parseFloat(match[1]);
29 test(function(){
30 assert_equals(actualWidth, 640);
31 }, "Check viewport width.");
32 </script>
33 </body>
34 </html>