OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></s
cript> | 4 <script src="../../http/tests/inspector-protocol/resources/inspector-protocol-te
st.js"></script> |
5 <script src="device-emulation-test.js"></script> | 5 <script src="../resources/device-emulation-test.js"></script> |
6 | 6 |
7 <script> | 7 <script> |
8 // This test is based on http://jsbin.com/urowoh/latest. | 8 // This test is based on http://jsbin.com/urowoh/latest. |
9 setMetaViewport(); | 9 setMetaViewport(); |
10 </script> | 10 </script> |
11 | 11 |
12 <style> | 12 <style> |
13 html { | 13 html { |
14 overflow-x: hidden; | 14 overflow-x: hidden; |
15 } | 15 } |
(...skipping 17 matching lines...) Expand all Loading... |
33 <body onload="runTest()"> | 33 <body onload="runTest()"> |
34 <p> | 34 <p> |
35 Tests that turning on device emulation with a non-1 device pixel ratio sets the | 35 Tests that turning on device emulation with a non-1 device pixel ratio sets the |
36 appropriate initial scale. Page scale is reflected by the innerWidth and | 36 appropriate initial scale. Page scale is reflected by the innerWidth and |
37 innerHeight properties. Since the layout width is set to 980 (in the viewport | 37 innerHeight properties. Since the layout width is set to 980 (in the viewport |
38 meta tag), and the emulated viewport width is 490 px, the initial scale should | 38 meta tag), and the emulated viewport width is 490 px, the initial scale should |
39 be 490/980 = 0.5. i.e. innerWidth=980 innerHeight=640. | 39 be 490/980 = 0.5. i.e. innerWidth=980 innerHeight=640. |
40 </p> | 40 </p> |
41 </body> | 41 </body> |
42 </html> | 42 </html> |
OLD | NEW |