blob: b8f2c387aeee6a0abea7a1455da1dcc0aa6943be [file] [log] [blame]
(async function(testRunner) {
var {page, session, dp} = await testRunner.startBlank('Tests that device emulation affects media rules, viewport meta tag, body dimensions and window.screen.');
var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator.js');
var deviceEmulator = new DeviceEmulator(testRunner, session);
await deviceEmulator.emulate(1200, 1000, 1);
var viewport = 'w=320';
testRunner.log(`Loading page with viewport=${viewport}`);
await session.navigate('../resources/device-emulation.html?' + viewport);
testRunner.log(await session.evaluate(`dumpMetrics(true)`));
testRunner.completeTest();
})