Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / repaint / slider-thumb-float.html
1 <html>
2 <head>
3 <style>
4
5 input {
6     float: left;
7     -webkit-appearance: none;
8     background-color: Red;
9     height: 10px;
10     width: 100px;
11 }
12
13 input::-webkit-slider-thumb {
14     -webkit-appearance: none;
15     background-color: Green;
16     width: 10px;
17     height: 10px;
18 }
19
20 </style>
21 <script>
22
23 // Tests that the slider thumb is repainted correctly when the input element
24 // is floated.
25
26 function clickAndDrag(element)
27 {
28     if (!window.eventSender)
29         return;
30
31     var maxX = element.offsetLeft + element.offsetWidth;
32     var x = maxX / 2;
33     var y = element.offsetTop + element.offsetHeight / 2;
34     eventSender.mouseMoveTo(x, y);
35     eventSender.mouseDown();
36     eventSender.mouseMoveTo(maxX, y);
37     eventSender.mouseUp();
38 }
39
40 function runTest()
41 {
42     clickAndDrag(document.getElementById('slider'));
43 }
44
45 </script>
46 </head>
47 <body onload="runTest()">
48 <input id="slider" type="range" value="0">
49 </body>
50 </html>