| 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 // The page scale, as set by window.eventSender.setPageScaleFactor sho
uld not be apparent | 13 // The page scale, as set by window.eventSender.setPageScaleFactor sho
uld not be apparent |
| 14 // to javascript. So, we expect scrolling to (100,100) to be page coor
dinates, rather | 14 // to javascript. So, we expect scrolling to (100,100) to be page coor
dinates, rather |
| 15 // than device pixels. | 15 // than device pixels. |
| 16 window.scrollTo(100,100); | 16 window.scrollTo(100,100); |
| 17 | 17 |
| 18 shouldBe("window.document.body.scrollTop", "100"); | 18 shouldBe("window.document.scrollingElement.scrollTop", "100"); |
| 19 shouldBe("window.document.body.scrollLeft", "100"); | 19 shouldBe("window.document.scrollingElement.scrollLeft", "100"); |
| 20 shouldBe("window.scrollX", "100"); | 20 shouldBe("window.scrollX", "100"); |
| 21 shouldBe("window.scrollY", "100"); | 21 shouldBe("window.scrollY", "100"); |
| 22 } | 22 } |
| 23 | 23 |
| 24 function scaleWithEventSender() { | 24 function scaleWithEventSender() { |
| 25 var scaleFactor = 2.0; | 25 var scaleFactor = 2.0; |
| 26 var scaleOffset = 0; | 26 var scaleOffset = 0; |
| 27 if (window.eventSender) | 27 if (window.eventSender) |
| 28 eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scaleOffset
); | 28 eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scaleOffset
); |
| 29 } | 29 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 <div style="left:100px; top:0; width:100px; height:100px; position:absolute;
background:green;"></div> | 40 <div style="left:100px; top:0; width:100px; height:100px; position:absolute;
background:green;"></div> |
| 41 <div style="left:200px; top:0; width:100px; height:100px; position:absolute;
background:blue;"></div> | 41 <div style="left:200px; top:0; width:100px; height:100px; position:absolute;
background:blue;"></div> |
| 42 | 42 |
| 43 <div style="left:0; top:100px; width:100px; height:100px; position:absolute;
background: green;"></div> | 43 <div style="left:0; top:100px; width:100px; height:100px; position:absolute;
background: green;"></div> |
| 44 <div style="left:100px; top:100px; width:100px; height:100px; position:absol
ute; background:blue;"></div> | 44 <div style="left:100px; top:100px; width:100px; height:100px; position:absol
ute; background:blue;"></div> |
| 45 <div style="left:200px; top:100px; width:100px; height:100px; position:absol
ute; background:yellow;"></div> | 45 <div style="left:200px; top:100px; width:100px; height:100px; position:absol
ute; background:yellow;"></div> |
| 46 | 46 |
| 47 <div id="console"></div> | 47 <div id="console"></div> |
| 48 </body> | 48 </body> |
| 49 </html> | 49 </html> |
| OLD | NEW |