| 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-protocol/inspector-protocol-test.js"></s
cript> |
| 5 <script src="../../http/tests/inspector/elements-test.js"></script> | |
| 6 <script src="device-emulation-test.js"></script> | 5 <script src="device-emulation-test.js"></script> |
| 7 | 6 |
| 8 <script> | 7 <script> |
| 9 // This test is based on http://jsbin.com/urowoh/latest. | 8 // This test is based on http://jsbin.com/urowoh/latest. |
| 10 setMetaViewport(); | 9 setMetaViewport(); |
| 11 </script> | 10 </script> |
| 12 | 11 |
| 13 <style> | 12 <style> |
| 14 html { | 13 html { |
| 15 overflow-x: hidden; | 14 overflow-x: hidden; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 34 <body onload="runTest()"> | 33 <body onload="runTest()"> |
| 35 <p> | 34 <p> |
| 36 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 |
| 37 appropriate initial scale. Page scale is reflected by the innerWidth and | 36 appropriate initial scale. Page scale is reflected by the innerWidth and |
| 38 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 |
| 39 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 |
| 40 be 490/980 = 0.5. i.e. innerWidth=980 innerHeight=640. | 39 be 490/980 = 0.5. i.e. innerWidth=980 innerHeight=640. |
| 41 </p> | 40 </p> |
| 42 </body> | 41 </body> |
| 43 </html> | 42 </html> |
| OLD | NEW |