OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <script src="../../http/tests/inspector/inspector-test.js"></script> | 4 <script src="../../http/tests/inspector/inspector-test.js"></script> |
5 <script src="../../http/tests/inspector/elements-test.js"></script> | 5 <script src="../../http/tests/inspector/elements-test.js"></script> |
6 <script src="device-emulation-test.js"></script> | 6 <script src="device-emulation-test.js"></script> |
7 | 7 |
8 <script> | 8 <script> |
9 // This test is based on http://jsbin.com/urowoh/latest. | 9 // This test is based on http://jsbin.com/urowoh/latest. |
10 setMetaViewport(); | 10 setMetaViewport("w=dw"); |
11 </script> | 11 </script> |
12 | 12 |
13 <style> | 13 <style> |
14 html { | 14 html { |
15 overflow-x: hidden; | 15 overflow-x: hidden; |
16 } | 16 } |
17 | 17 |
18 body { | 18 body { |
19 margin: 0; | 19 margin: 0; |
20 min-height: 1000px; | 20 min-height: 100px; |
21 overflow-x: hidden; | 21 overflow: hidden; |
22 } | 22 } |
23 </style> | 23 </style> |
24 | 24 |
25 <script> | 25 <script> |
26 function test() | 26 function test() |
27 { | 27 { |
28 InspectorTest.testDeviceEmulation("device-emulation-980-2x.html", 1200, 1000
, 2, "w=980"); | 28 InspectorTest.testDeviceEmulation("device-emulation-small-dw.html", 380, 420
, 1, "w=dw", undefined, false); |
29 } | 29 } |
30 </script> | 30 </script> |
31 | 31 |
32 </head> | 32 </head> |
33 <body onload="runTest()"> | 33 <body onload="runTest()"> |
34 <p> | 34 <p> |
35 Tests that device emulation affects media rules, viewport meta tag, body dimensi
ons and window.screen. | 35 Tests that device emulation affects media rules, viewport meta tag, body dimensi
ons and window.screen. |
| 36 Emulating small device on a page with viewport "width=device-width" set should w
ork without reload for page without scrollbar. |
36 </p> | 37 </p> |
37 </body> | 38 </body> |
38 </html> | 39 </html> |
OLD | NEW |