Index: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.js |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.js b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..684386cd47421f74eb792322e8eddea706744514 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.js |
@@ -0,0 +1,14 @@ |
+(async function(testRunner) { |
+ let {page, session, dp} = await testRunner.startBlank('Tests that device emulation with insets affects window.screenWidth, window.screenHeight, screen.width and screen.height.'); |
+ |
+ var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator.js'); |
+ var deviceEmulator = new DeviceEmulator(testRunner, session); |
+ await deviceEmulator.emulate(1200, 1000, 1, {left: 10, top: 20, right: 30, bottom: 40}); |
+ |
+ 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(); |
+}) |