OLD | NEW |
(Empty) | |
| 1 (async function(testRunner) { |
| 2 let {page, session, dp} = await testRunner.startBlank('Tests that form control
s are rendered with correct theme. See crbug.com/591315.'); |
| 3 |
| 4 var DeviceEmulator = await testRunner.loadScript('../resources/device-emulator
.js'); |
| 5 var deviceEmulator = new DeviceEmulator(testRunner, session); |
| 6 await deviceEmulator.emulate(800, 600, 1); |
| 7 |
| 8 var viewport = 'none'; |
| 9 testRunner.log(`Loading page with viewport=${viewport}`); |
| 10 await session.navigate('../resources/device-emulation.html?' + viewport); |
| 11 |
| 12 testRunner.log(await session.evaluate(`dumpMetrics(true)`)); |
| 13 testRunner.log(await session.evaluate(` |
| 14 var input = document.createElement('input'); |
| 15 input.type = 'radio'; |
| 16 document.body.appendChild(input); |
| 17 'measured radio: ' + input.offsetWidth + 'x' + input.offsetHeight |
| 18 `)); |
| 19 testRunner.log(await session.evaluate(` |
| 20 var input = document.createElement('input'); |
| 21 input.type = 'checkbox'; |
| 22 document.body.appendChild(input); |
| 23 'measured checkbox: ' + input.offsetWidth + 'x' + input.offsetHeight |
| 24 `)); |
| 25 testRunner.completeTest(); |
| 26 }) |
OLD | NEW |