| 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/inspector-test.js"></script> |
| 5 | 5 |
| 6 <style> | 6 <style> |
| 7 body { | 7 body { |
| 8 margin: 0; | 8 margin: 0; |
| 9 min-height: 1000px; | 9 min-height: 1000px; |
| 10 } | 10 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 function parse(json) | 33 function parse(json) |
| 34 { | 34 { |
| 35 callback(JSON.parse(json.value)); | 35 callback(JSON.parse(json.value)); |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 var initialMetrics; | 39 var initialMetrics; |
| 40 | 40 |
| 41 function testPartialOverride(name, value, next) | 41 function testPartialOverride(name, value, next) |
| 42 { | 42 { |
| 43 var params = {width: 0, height: 0, deviceScaleFactor: 0, emulateViewport
: false, fitWindow: false}; | 43 var params = {width: 0, height: 0, deviceScaleFactor: 0, mobile: false,
fitWindow: false}; |
| 44 if (name === null) { | 44 if (name === null) { |
| 45 PageAgent.clearDeviceMetricsOverride(getPageMetrics.bind(null, check
)); | 45 PageAgent.clearDeviceMetricsOverride(getPageMetrics.bind(null, check
)); |
| 46 } else { | 46 } else { |
| 47 if (name) | 47 if (name) |
| 48 params[name] = value; | 48 params[name] = value; |
| 49 PageAgent.invoke_setDeviceMetricsOverride(params, getPageMetrics.bin
d(null, check)); | 49 PageAgent.invoke_setDeviceMetricsOverride(params, getPageMetrics.bin
d(null, check)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 function check(metrics) | 52 function check(metrics) |
| 53 { | 53 { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 </script> | 130 </script> |
| 131 | 131 |
| 132 </head> | 132 </head> |
| 133 <body onload="runTest()"> | 133 <body onload="runTest()"> |
| 134 <p> | 134 <p> |
| 135 Tests that overriding only a single parameter does not affect others. | 135 Tests that overriding only a single parameter does not affect others. |
| 136 </p> | 136 </p> |
| 137 </body> | 137 </body> |
| 138 </html> | 138 </html> |
| OLD | NEW |