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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.js

Issue 2960023003: [DevTools] Migrate inspector-protocol/emulation tests to new harness (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.js b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.js
new file mode 100644
index 0000000000000000000000000000000000000000..13649f12fe890a01e444cbd2d13a0d48eb3a3482
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.js
@@ -0,0 +1,26 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank('Tests that form controls are rendered with correct theme. See crbug.com/591315.');
+
+ var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator.js');
+ var deviceEmulator = new DeviceEmulator(testRunner, session);
+ await deviceEmulator.emulate(800, 600, 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.log(await session.evaluate(`
+ var input = document.createElement('input');
+ input.type = 'radio';
+ document.body.appendChild(input);
+ 'measured radio: ' + input.offsetWidth + 'x' + input.offsetHeight
+ `));
+ testRunner.log(await session.evaluate(`
+ var input = document.createElement('input');
+ input.type = 'checkbox';
+ document.body.appendChild(input);
+ 'measured checkbox: ' + input.offsetWidth + 'x' + input.offsetHeight
+ `));
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698