| OLD | NEW |
| 1 var initialize_DeviceMode = function() | 1 var initialize_DeviceMode = function() |
| 2 { | 2 { |
| 3 InspectorTest.buildFakePhone = function(overrides) | 3 InspectorTest.buildFakePhone = function(overrides) |
| 4 { | 4 { |
| 5 var StandardPhoneJSON = { | 5 var StandardPhoneJSON = { |
| 6 "show-by-default": false, | 6 "show-by-default": false, |
| 7 "title": "Fake Phone 1", | 7 "title": "Fake Phone 1", |
| 8 "screen": { | 8 "screen": { |
| 9 "horizontal": { "width": 480, "height": 320 }, | 9 "horizontal": { "width": 480, "height": 320 }, |
| 10 "device-pixel-ratio": 2, | 10 "device-pixel-ratio": 2, |
| 11 "vertical": { "width": 320, "height": 480 } | 11 "vertical": { "width": 320, "height": 480 } |
| 12 }, | 12 }, |
| 13 "capabilities": ["touch", "mobile"], | 13 "capabilities": ["touch", "mobile"], |
| 14 "user-agent": "fakeUserAgent", | 14 "user-agent": "fakeUserAgent", |
| 15 "type": "phone", | 15 "type": "phone", |
| 16 "modes": [ | 16 "modes": [ |
| 17 { | 17 { |
| 18 "title": "default", | 18 "title": "default", |
| 19 "orientation": "vertical", | 19 "orientation": "vertical", |
| 20 "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } | 20 "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } |
| 21 }, | 21 }, |
| 22 { | 22 { |
| 23 "title": "default", | 23 "title": "default", |
| 24 "orientation": "horizontal", | 24 "orientation": "horizontal", |
| 25 "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } | 25 "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } |
| 26 } | 26 } |
| 27 ] | 27 ] |
| 28 }; | 28 }; |
| 29 var json = Object.assign(StandardPhoneJSON, overrides || {}); | 29 var json = Object.assign(StandardPhoneJSON, overrides || {}); |
| 30 return WebInspector.EmulatedDevice.fromJSONV1(json); | 30 return Emulation.EmulatedDevice.fromJSONV1(json); |
| 31 } | 31 } |
| 32 } | 32 } |
| OLD | NEW |