| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
| 5 @media (max-device-width: 998px) and (max-device-height: 1199x) { | 5 @media (max-device-width: 998px) and (max-device-height: 1199x) { |
| 6 #main { background: red; } | 6 #main { background: red; } |
| 7 } | 7 } |
| 8 | 8 |
| 9 @media (max-device-width: 1000px) and (max-device-height: 1200px) { | 9 @media (max-device-width: 1000px) and (max-device-height: 1200px) { |
| 10 #main { background: green; } | 10 #main { background: green; } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 function applyOverride(width, height, userCallback) | 116 function applyOverride(width, height, userCallback) |
| 117 { | 117 { |
| 118 function callback(error) | 118 function callback(error) |
| 119 { | 119 { |
| 120 if (error) | 120 if (error) |
| 121 InspectorTest.addResult("Override: " + width + "x" + height + "
=> ERROR"); | 121 InspectorTest.addResult("Override: " + width + "x" + height + "
=> ERROR"); |
| 122 userCallback(); | 122 userCallback(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 var enabled = width != 0 || height != 0; | 125 var enabled = width != 0 || height != 0; |
| 126 PageAgent.setDeviceMetricsOverride(width, height, 1, true, callback); | 126 PageAgent.setDeviceMetricsOverride(width, height, 1, false, true, callba
ck); |
| 127 overridesEnabled = enabled; | 127 overridesEnabled = enabled; |
| 128 } | 128 } |
| 129 | 129 |
| 130 function overrideAndDumpData(width, height, callback) | 130 function overrideAndDumpData(width, height, callback) |
| 131 { | 131 { |
| 132 function finalCallback() | 132 function finalCallback() |
| 133 { | 133 { |
| 134 InspectorTest.addResult("Main style:"); | 134 InspectorTest.addResult("Main style:"); |
| 135 InspectorTest.dumpSelectedElementStyles(true, false, true); | 135 InspectorTest.dumpSelectedElementStyles(true, false, true); |
| 136 callback(); | 136 callback(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 </head> | 181 </head> |
| 182 | 182 |
| 183 <body onload="runTest()"> | 183 <body onload="runTest()"> |
| 184 <p> | 184 <p> |
| 185 Tests that screen dimension overrides affect media rules, body dimensions, and w
indow.screen. | 185 Tests that screen dimension overrides affect media rules, body dimensions, and w
indow.screen. |
| 186 </p> | 186 </p> |
| 187 | 187 |
| 188 <div id="main"></div> | 188 <div id="main"></div> |
| 189 </body> | 189 </body> |
| 190 </html> | 190 </html> |
| OLD | NEW |