OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 ::-webkit-scrollbar { | 4 ::-webkit-scrollbar { |
5 width: 0px; | 5 width: 0px; |
6 height: 0px; | 6 height: 0px; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <script> | 9 <script> |
10 window.enablePixelTesting = true; | 10 window.enablePixelTesting = true; |
11 | 11 |
12 function scroll() { | 12 function scroll() { |
13 // Fully scroll to bring the fixed pos rect into view. | 13 // Fully scroll to bring the fixed pos rect into view. |
14 window.scrollTo(500, 1700); | 14 eventSender.mouseMoveTo(100, 100); |
| 15 eventSender.continuousMouseScrollBy(-500, -1700); |
15 } | 16 } |
16 | 17 |
17 function scaleWithEventSender() { | 18 function scaleWithEventSender() { |
18 var scaleFactor = 2.0; | 19 var scaleFactor = 2.0; |
19 if (window.internals) { | 20 if (window.internals) { |
20 internals.setPageScaleFactor(scaleFactor); | 21 internals.setPageScaleFactor(scaleFactor); |
21 } | 22 } |
22 } | 23 } |
23 | 24 |
24 function test() { | 25 function test() { |
25 document.body.style.width = (document.body.clientWidth + 100) + "px"; | 26 document.body.style.width = (document.body.clientWidth + 100) + "px"; |
26 scaleWithEventSender(); | 27 scaleWithEventSender(); |
27 scroll(); | 28 scroll(); |
28 } | 29 } |
29 </script> | 30 </script> |
30 <script src="../../resources/js-test.js"></script> | 31 <script src="../../resources/js-test.js"></script> |
31 </head> | 32 </head> |
32 <body style="height: 2000px; width: 2000px; margin:0px;" onload="test();"> | 33 <body style="height: 2000px; width: 2000px; margin:0px;" onload="test();"> |
33 <div style="position: fixed; bottom: 100px; right: 100px; z-index: 1"> | 34 <div style="position: fixed; bottom: 100px; right: 100px; z-index: 1"> |
34 <div style="left:0; top:0; width:100px; height:100px; position:absolute;
background:black;"></div> | 35 <div style="left:0; top:0; width:100px; height:100px; position:absolute;
background:black;"></div> |
35 <div style="left:100px; top:0; width:100px; height:100px; position:absol
ute; background:green;"></div> | 36 <div style="left:100px; top:0; width:100px; height:100px; position:absol
ute; background:green;"></div> |
36 | 37 |
37 <div style="left:0px; top:100px; width:100px; height:100px; position:abs
olute; background:yellow;"></div> | 38 <div style="left:0px; top:100px; width:100px; height:100px; position:abs
olute; background:yellow;"></div> |
38 <div style="left:100px; top:100px; width:100px; height:100px; position:a
bsolute; background:blue;"></div> | 39 <div style="left:100px; top:100px; width:100px; height:100px; position:a
bsolute; background:blue;"></div> |
39 </div> | 40 </div> |
40 </body> | 41 </body> |
41 </html> | 42 </html> |
OLD | NEW |