1 window.jsTestIsAsync = true;
6 function getSpinButton(input)
10 return getElementByPseudoId(internals.oldestShadowRoot(input), "-webkit-inner-spin-button");
15 if (!window.eventSender)
17 eventSender.mouseDown();
18 eventSender.mouseUp();
21 function mouseMoveTo(x, y)
23 if (!window.eventSender)
25 eventSender.mouseMoveTo(x, y);
28 function runIFrameLoaded(config)
30 testInput = iframe.contentDocument.getElementById('test');
32 var spinButton = getSpinButton(testInput);
35 iframe.offsetLeft + spinButton.offsetLeft + spinButton.offsetWidth / 2,
36 iframe.offsetTop + spinButton.offsetTop + spinButton.offsetHeight / 4);
39 shouldBeEqualToString('testInput.value', config['expectedValue']);
40 iframe.parentNode.removeChild(iframe);
44 function testClickSpinButtonInIFrame(config)
46 description('Checks mouse click on spin button in iframe.');
47 if (!window.eventSender)
48 debug('Please run in DumpRenderTree');
50 iframe = document.createElement('iframe');
51 iframe.addEventListener('load', function () { runIFrameLoaded(config) });
52 iframe.srcdoc = '<input id=test type=' + config['inputType'] + ' value="' + config['initialValue'] + '">';
53 document.body.appendChild(iframe);