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 window.scrollTo(0, 100); | 13 window.scrollTo(0, 100); |
14 var frame = document.getElementById('frame'); | 14 var frame = document.getElementById('frame'); |
15 frame.contentWindow.scrollTo(100,100); | 15 frame.contentWindow.scrollTo(100,100); |
16 | 16 |
17 shouldBe("frame.contentDocument.body.scrollTop", "100"); | 17 shouldBe("frame.contentDocument.body.scrollTop", "100"); |
18 shouldBe("frame.contentDocument.body.scrollLeft", "100"); | 18 shouldBe("frame.contentDocument.body.scrollLeft", "100"); |
19 shouldBe("frame.contentWindow.scrollX", "100"); | 19 shouldBe("frame.contentWindow.scrollX", "100"); |
20 shouldBe("frame.contentWindow.scrollY", "100"); | 20 shouldBe("frame.contentWindow.scrollY", "100"); |
21 } | 21 } |
22 | 22 |
23 function scaleWithEventSender() { | 23 function scaleWithEventSender() { |
24 var scaleFactor = 0.5; | 24 var scaleFactor = 0.5; |
25 var scaleOffset = 0; | 25 var scaleOffset = 0; |
26 if (window.internals) { | 26 if (window.eventSender) |
27 window.internals.setPageScaleFactor(scaleFactor, scaleOffset, s
caleOffset); | 27 eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scaleOf
fset); |
28 } | |
29 } | 28 } |
30 | 29 |
31 function test() { | 30 function test() { |
32 scaleWithEventSender(); | 31 scaleWithEventSender(); |
33 scroll(); | 32 scroll(); |
34 } | 33 } |
35 </script> | 34 </script> |
36 <script src="../js/resources/js-test-pre.js"></script> | 35 <script src="../js/resources/js-test-pre.js"></script> |
37 </head> | 36 </head> |
38 <body onload="test();" style="height: 2000px"> | 37 <body onload="test();" style="height: 2000px"> |
(...skipping 13 matching lines...) Expand all Loading... |
52 doc.write("<div style='left:100px; top:100px; width:100px; height:100px;
position:absolute; background:blue;'></div>"); | 51 doc.write("<div style='left:100px; top:100px; width:100px; height:100px;
position:absolute; background:blue;'></div>"); |
53 doc.write("<div style='left:200px; top:100px; width:100px; height:100px;
position:absolute; background:green;'></div>"); | 52 doc.write("<div style='left:200px; top:100px; width:100px; height:100px;
position:absolute; background:green;'></div>"); |
54 doc.write("<div style='left:300px; top:100px; width:100px; height:100px;
position:absolute; background:blue;'></div>"); | 53 doc.write("<div style='left:300px; top:100px; width:100px; height:100px;
position:absolute; background:blue;'></div>"); |
55 doc.write("<div style='left:400px; top:100px; width:100px; height:100px;
position:absolute; background:green;'></div>"); | 54 doc.write("<div style='left:400px; top:100px; width:100px; height:100px;
position:absolute; background:green;'></div>"); |
56 doc.close(); | 55 doc.close(); |
57 frame.contentDocument.body.style.width = "2000px"; | 56 frame.contentDocument.body.style.width = "2000px"; |
58 frame.contentDocument.body.style.height = "2000px"; | 57 frame.contentDocument.body.style.height = "2000px"; |
59 </script> | 58 </script> |
60 </body> | 59 </body> |
61 </html> | 60 </html> |
OLD | NEW |