OLD | NEW |
1 <html><body onload="scroll()"> | 1 <html><body onload="scroll()"> |
2 <script> | 2 <script> |
3 function scroll() { | 3 function scroll() { |
4 if (window.eventSender) { | 4 if (window.eventSender) { |
5 var scrollbar = document.getElementById("subframe").contentDocument.getE
lementById('scrollable'); | 5 var scrollbar = document.getElementById("subframe").contentDocument.getE
lementById('scrollable'); |
6 | 6 |
7 var startX = scrollbar.offsetLeft + scrollbar.offsetWidth - 5; | 7 var startX = scrollbar.offsetLeft + scrollbar.offsetWidth - 5; |
8 var startY = scrollbar.offsetTop + 200; | 8 var startY = scrollbar.offsetTop + 200; |
9 | 9 |
10 eventSender.mouseMoveTo(startX, startY - 100); | 10 eventSender.mouseMoveTo(startX, startY - 100); |
(...skipping 23 matching lines...) Expand all Loading... |
34 </script> | 34 </script> |
35 <div id="console"></div> | 35 <div id="console"></div> |
36 <iframe id="subframe" width="500px" height="350" scrolling="no" marginwidth="0"
marginheight="0" src="resources/subframe-with-scrollable-div.html"></iframe> | 36 <iframe id="subframe" width="500px" height="350" scrolling="no" marginwidth="0"
marginheight="0" src="resources/subframe-with-scrollable-div.html"></iframe> |
37 <br>This test does the following via EventSender:<br> | 37 <br>This test does the following via EventSender:<br> |
38 1. Click and drag the div scrollbar to a middle point.<br> | 38 1. Click and drag the div scrollbar to a middle point.<br> |
39 2. Click and drag again, this time down and to right, with the mouseup occurring
in a parent frame.<br> | 39 2. Click and drag again, this time down and to right, with the mouseup occurring
in a parent frame.<br> |
40 3. Move the mouse back into the div with the scrollbar.<br> | 40 3. Move the mouse back into the div with the scrollbar.<br> |
41 Per https://bugs.webkit.org/show_bug.cgi?id=73097, because the div with the scro
llbar had a mousedown event that called preventDefault(), | 41 Per https://bugs.webkit.org/show_bug.cgi?id=73097, because the div with the scro
llbar had a mousedown event that called preventDefault(), |
42 the mouse moves would not properly be handled by the scrollbar. We pass if the d
iv's scrollTop property is the same after all 3 steps. | 42 the mouse moves would not properly be handled by the scrollbar. We pass if the d
iv's scrollTop property is the same after all 3 steps. |
43 </body></html> | 43 </body></html> |
OLD | NEW |