| OLD | NEW |
| 1 function setMetaViewport() | 1 function setMetaViewport() |
| 2 { | 2 { |
| 3 var VIEWPORTS = { | 3 var VIEWPORTS = { |
| 4 "w=320": "width=320", | 4 "w=320": "width=320", |
| 5 "w=dw": "width=device-width", | 5 "w=dw": "width=device-width", |
| 6 "w=980": "width=980", | 6 "w=980": "width=980", |
| 7 "none": "no viewport (desktop site)" | 7 "none": "no viewport (desktop site)" |
| 8 }; | 8 }; |
| 9 | 9 |
| 10 var viewport = VIEWPORTS["none"]; | 10 var viewport = VIEWPORTS["none"]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return { matches: bool, media: q }; | 43 return { matches: bool, media: q }; |
| 44 }; | 44 }; |
| 45 })(document); | 45 })(document); |
| 46 | 46 |
| 47 var results; | 47 var results; |
| 48 | 48 |
| 49 function dumpMetrics() | 49 function dumpMetrics() |
| 50 { | 50 { |
| 51 results = []; | 51 results = []; |
| 52 writeResult("Device:", ""); | 52 writeResult("Device:", ""); |
| 53 testJS("window.screenX"); |
| 54 testJS("window.screenY"); |
| 53 | 55 |
| 54 writeResult("Viewport:", location.search); | 56 writeResult("Viewport:", location.search); |
| 55 | 57 |
| 56 testMQOrientation(); | 58 testMQOrientation(); |
| 57 testJS("window.orientation", ""); | 59 testJS("window.orientation", ""); |
| 58 | 60 |
| 59 testMQDimension("resolution", null, "dpi"); | 61 testMQDimension("resolution", null, "dpi"); |
| 60 testMQDevicePixelRatio(window.devicePixelRatio); | 62 testMQDevicePixelRatio(window.devicePixelRatio); |
| 61 testJS("window.devicePixelRatio", ""); | 63 testJS("window.devicePixelRatio", ""); |
| 62 | 64 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 InspectorTest.emulateAndGetMetrics(width, height, deviceScaleFactor, viewpor
t, callback); | 212 InspectorTest.emulateAndGetMetrics(width, height, deviceScaleFactor, viewpor
t, callback); |
| 211 | 213 |
| 212 function callback() | 214 function callback() |
| 213 { | 215 { |
| 214 InspectorTest.addResult(InspectorTest._deviceEmulationResults.join("\n")
); | 216 InspectorTest.addResult(InspectorTest._deviceEmulationResults.join("\n")
); |
| 215 InspectorTest.completeTest(); | 217 InspectorTest.completeTest(); |
| 216 } | 218 } |
| 217 }; | 219 }; |
| 218 | 220 |
| 219 }; | 221 }; |
| OLD | NEW |