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

Side by Side Diff: LayoutTests/inspector/device-emulation/device-emulation-test.js

Issue 205403004: [DevTools] Allow overriding only the device scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase, one test fixed Created 6 years, 9 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 unified diff | Download patch
OLDNEW
1 function setMetaViewport() 1 function setMetaViewport()
2 { 2 {
3 var VIEWPORTS = { 3 var VIEWPORTS = {
4 "w=320": "width=320", 4 "w=320": "width=320",
5 "w=dw": "width=device-width", 5 "w=dw": "width=device-width",
6 "w=980": "width=980", 6 "w=980": "width=980",
7 "none": "no viewport (desktop site)" 7 "none": "no viewport (desktop site)"
8 }; 8 };
9 9
10 var viewport = VIEWPORTS["none"]; 10 var viewport = VIEWPORTS["none"];
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return { matches: bool, media: q }; 43 return { matches: bool, media: q };
44 }; 44 };
45 })(document); 45 })(document);
46 46
47 var results; 47 var results;
48 48
49 function dumpMetrics() 49 function dumpMetrics()
50 { 50 {
51 results = []; 51 results = [];
52 writeResult("Device:", ""); 52 writeResult("Device:", "");
53 testJS("window.screenX");
54 testJS("window.screenY");
53 55
54 writeResult("Viewport:", location.search); 56 writeResult("Viewport:", location.search);
55 57
56 testMQOrientation(); 58 testMQOrientation();
57 testJS("window.orientation", ""); 59 testJS("window.orientation", "");
58 60
59 testMQDimension("resolution", null, "dpi"); 61 testMQDimension("resolution", null, "dpi");
60 testMQDevicePixelRatio(window.devicePixelRatio); 62 testMQDevicePixelRatio(window.devicePixelRatio);
61 testJS("window.devicePixelRatio", ""); 63 testJS("window.devicePixelRatio", "");
62 64
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 InspectorTest.emulateAndGetMetrics(width, height, deviceScaleFactor, viewpor t, callback); 212 InspectorTest.emulateAndGetMetrics(width, height, deviceScaleFactor, viewpor t, callback);
211 213
212 function callback() 214 function callback()
213 { 215 {
214 InspectorTest.addResult(InspectorTest._deviceEmulationResults.join("\n") ); 216 InspectorTest.addResult(InspectorTest._deviceEmulationResults.join("\n") );
215 InspectorTest.completeTest(); 217 InspectorTest.completeTest();
216 } 218 }
217 }; 219 };
218 220
219 }; 221 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698