OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="device-mode-test.js"></script> |
| 5 <script type="text/javascript"> |
| 6 function test() |
| 7 { |
| 8 var phone0 = InspectorTest.buildFakePhone(); |
| 9 var phone1 = InspectorTest.buildFakePhone(); |
| 10 |
| 11 var view = new WebInspector.DeviceModeView(); |
| 12 var toolbar = view._toolbar; |
| 13 var model = view._model; |
| 14 var viewportSize = new Size(800, 600); |
| 15 model.setAvailableSize(viewportSize, viewportSize); |
| 16 |
| 17 InspectorTest.addResult("\nTest that devices remember their scale."); |
| 18 InspectorTest.addResult("Switch to phone 0"); |
| 19 toolbar._emulateDevice(phone0); |
| 20 InspectorTest.addResult("Setting scale to 0.5"); |
| 21 toolbar._onScaleMenuChanged(0.5); |
| 22 InspectorTest.addResult("Phone0 Scale: " + model._scaleSetting.get()); |
| 23 InspectorTest.addResult("Switch to phone 1"); |
| 24 toolbar._emulateDevice(phone1); |
| 25 InspectorTest.addResult("Phone1 Scale: " + model._scaleSetting.get()); |
| 26 InspectorTest.addResult("Switch to phone 0"); |
| 27 toolbar._emulateDevice(phone0); |
| 28 InspectorTest.addResult("Phone0 Scale: " + model._scaleSetting.get()); |
| 29 |
| 30 InspectorTest.completeTest(); |
| 31 } |
| 32 |
| 33 </script> |
| 34 </head> |
| 35 <body onload="runTest()"> |
| 36 <p>Test preservation of orientation and scale when that switching devices in dev
ice mode.</p> |
| 37 </body> |
| 38 </html> |
OLD | NEW |