Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices.html

Issue 2431823002: DevTools: device mode devices remember last used zoom (Closed)
Patch Set: rename to device-mode-test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices.html
diff --git a/third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices.html b/third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices.html
new file mode 100644
index 0000000000000000000000000000000000000000..f0244812ddac48fd109330fcd0e339d6c0f5a634
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices.html
@@ -0,0 +1,38 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="device-mode-test.js"></script>
+<script type="text/javascript">
+function test()
+{
+ var phone0 = InspectorTest.buildFakePhone();
+ var phone1 = InspectorTest.buildFakePhone();
+
+ var view = new WebInspector.DeviceModeView();
+ var toolbar = view._toolbar;
+ var model = view._model;
+ var viewportSize = new Size(800, 600);
+ model.setAvailableSize(viewportSize, viewportSize);
+
+ InspectorTest.addResult("\nTest that devices remember their scale.");
+ InspectorTest.addResult("Switch to phone 0");
+ toolbar._emulateDevice(phone0);
+ InspectorTest.addResult("Setting scale to 0.5");
+ toolbar._onScaleMenuChanged(0.5);
+ InspectorTest.addResult("Phone0 Scale: " + model._scaleSetting.get());
+ InspectorTest.addResult("Switch to phone 1");
+ toolbar._emulateDevice(phone1);
+ InspectorTest.addResult("Phone1 Scale: " + model._scaleSetting.get());
+ InspectorTest.addResult("Switch to phone 0");
+ toolbar._emulateDevice(phone0);
+ InspectorTest.addResult("Phone0 Scale: " + model._scaleSetting.get());
+
+ InspectorTest.completeTest();
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Test preservation of orientation and scale when that switching devices in device mode.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-switching-devices-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698