Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / touch-before-pressing-spin-button.html
blobb0bcbc340c37b21cca51dc9a5a7525359235c77a
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <style type="text/css">
6 #box {
7 background-color:blue;
8 width:100px;
9 height:100px;
11 </style>
12 </head>
13 <body>
14 <div id="box" ontouchstart=""></div>
15 <div><input type="number" id="number" value="1"></div>
16 <script>
17 description('Test if a spin-button works correctly after touch events.');
18 if (window.eventSender) {
19 eventSender.addTouchPoint(50, 50);
20 eventSender.touchStart();
22 var numberInput = document.getElementById('number');
23 numberInput.focus();
24 eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);
25 eventSender.mouseDown();
26 eventSender.mouseUp();
27 shouldBe('numberInput.value', '"2"');
28 } else {
29 debug('Needs eventSender.');
31 </script>
32 </body>
33 </html>