| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 function applyOverride(width, height, userCallback) | 99 function applyOverride(width, height, userCallback) |
| 100 { | 100 { |
| 101 function callback(error) | 101 function callback(error) |
| 102 { | 102 { |
| 103 if (error) | 103 if (error) |
| 104 InspectorTest.addResult("Override: " + width + "x" + height + "
=> ERROR"); | 104 InspectorTest.addResult("Override: " + width + "x" + height + "
=> ERROR"); |
| 105 userCallback(); | 105 userCallback(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 var enabled = width > 0 && height > 0; | 108 var enabled = width > 0 && height > 0; |
| 109 PageAgent.setDeviceMetricsOverride(width, height, 1, true, callback); | 109 PageAgent.setDeviceMetricsOverride(width, height, 1, false, true, callba
ck); |
| 110 overridesEnabled = enabled; | 110 overridesEnabled = enabled; |
| 111 } | 111 } |
| 112 | 112 |
| 113 function overrideAndDumpData(width, height, callback) | 113 function overrideAndDumpData(width, height, callback) |
| 114 { | 114 { |
| 115 function finalCallback() | 115 function finalCallback() |
| 116 { | 116 { |
| 117 InspectorTest.addResult("Main style:"); | 117 InspectorTest.addResult("Main style:"); |
| 118 InspectorTest.dumpSelectedElementStyles(true, false, true); | 118 InspectorTest.dumpSelectedElementStyles(true, false, true); |
| 119 callback(); | 119 callback(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 </head> | 164 </head> |
| 165 | 165 |
| 166 <body onload="runTest()"> | 166 <body onload="runTest()"> |
| 167 <p> | 167 <p> |
| 168 Tests that disabling page agent cancels device metrics override. | 168 Tests that disabling page agent cancels device metrics override. |
| 169 </p> | 169 </p> |
| 170 | 170 |
| 171 <div id="main"></div> | 171 <div id="main"></div> |
| 172 </body> | 172 </body> |
| 173 </html> | 173 </html> |
| OLD | NEW |