Change fast/e* files to use pre and post js files in LayoutTests/resources.
[WebKit-https.git] / LayoutTests / fast / events / touch / touch-before-pressing-spin-button.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 <style type="text/css">
6 #box {
7     background-color:blue;
8     width:100px;
9     height:100px;
10 }
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();
21
22     var numberInput = document.getElementById('number');
23     eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);
24     eventSender.mouseDown();
25     eventSender.mouseUp();
26     shouldBe('numberInput.value', '"2"');
27 } else {
28     debug('Needs eventSender.');
29 }
30 </script>
31 <script src="../../../resources/js-test-post.js"></script>
32 </body>
33 </html>