| 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();
|
| +})
|
|
|