| window.jsTestIsAsync = true; |
| function getSpinButton(input) |
| return getElementByPseudoId(internals.shadowRoot(input), "-webkit-inner-spin-button"); |
| function mouseMoveTo(x, y) |
| eventSender.mouseMoveTo(x, y); |
| function runIFrameLoaded(config) |
| testInput = iframe.contentDocument.getElementById('test'); |
| var spinButton = getSpinButton(testInput); |
| iframe.offsetLeft + spinButton.offsetLeft + spinButton.offsetWidth / 2, |
| iframe.offsetTop + spinButton.offsetTop + spinButton.offsetHeight / 4); |
| shouldBeEqualToString('testInput.value', config['expectedValue']); |
| iframe.parentNode.removeChild(iframe); |
| function testClickSpinButtonInIFrame(config) |
| description('Checks mouse click on spin button in iframe.'); |
| debug('Please run in DumpRenderTree'); |
| iframe = document.createElement('iframe'); |
| iframe.addEventListener('load', function () { runIFrameLoaded(config) }); |
| iframe.srcdoc = '<input id=test type=' + config['inputType'] + ' value="' + config['initialValue'] + '">'; |
| document.body.appendChild(iframe); |