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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small-dw.js

Issue 2960023003: [DevTools] Migrate inspector-protocol/emulation tests to new harness (Closed)
Patch Set: Created 3 years, 5 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
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank(`
3 Tests that device emulation affects media rules, viewport meta tag, body dim ensions and window.screen.
4 Emulating small device on a page with viewport "width=device-width" set shou ld work without reload for page without scrollbar.
5 `);
6
7 var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator .js');
8 var deviceEmulator = new DeviceEmulator(testRunner, session);
9 await deviceEmulator.emulate(380, 420, 1);
10
11 var viewport = 'w=dw';
12 testRunner.log(`Loading page with viewport=${viewport}`);
13 await session.navigate('../resources/device-emulation.html?' + viewport);
14 await session.evaluate(`document.body.classList.add('small')`);
15
16 testRunner.log(await session.evaluate(`dumpMetrics(true)`));
17 testRunner.completeTest();
18 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698