Index: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.js |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.js b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a30d32112a84206354bef421a9d0ca887dda5f4a |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.js |
@@ -0,0 +1,17 @@ |
+(async function(testRunner) { |
+ let {page, session, dp} = await testRunner.startBlank(` |
+ Tests that device emulation affects media rules, viewport meta tag, body dimensions and window.screen. |
+ Emulating small device on a page without viewport set should take UA viewport settings into account. |
+ `); |
+ |
+ var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator.js'); |
+ var deviceEmulator = new DeviceEmulator(testRunner, session); |
+ await deviceEmulator.emulate(380, 420, 1); |
+ |
+ var viewport = 'none'; |
+ testRunner.log(`Loading page with viewport=${viewport}`); |
+ await session.navigate('../resources/device-emulation.html?' + viewport); |
+ |
+ testRunner.log(await session.evaluate(`dumpMetrics(true)`)); |
+ testRunner.completeTest(); |
+}) |