OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <style> |
3 <head> | 3 iframe { |
| 4 position: absolute; |
| 5 left: 100px; |
| 6 top: 100px; |
| 7 height: 120px; |
| 8 width: 120px; |
| 9 padding: 10px; |
| 10 border: none; |
| 11 } |
| 12 </style> |
| 13 |
| 14 <iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px;height
:1000px;'>Should be covered by a green overlay.</body></html>"></iframe> |
| 15 <div id="console"></div> |
| 16 |
| 17 <script src="../resources/js-test.js"></script> |
4 <script src="resources/non-fast-scrollable-region-testing.js"></script> | 18 <script src="resources/non-fast-scrollable-region-testing.js"></script> |
5 </head> | 19 <script> |
6 <body onload="runNonFastScrollableRegionTest(2);"> | 20 window.jsTestIsAsync = true; |
7 <iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px;height
:1000px;'></body></html>" style="position:absolute;left:50px;top:50px;width;150p
x;height:200px;padding:10px;"></iframe> | 21 description('This test ensures non-fast scrollable areas are calculated ' + |
8 </body> | 22 'correctly when page is scaled.'); |
9 </html> | |
10 | 23 |
| 24 onload = function() { |
| 25 if (window.eventSender) |
| 26 window.eventSender.setPageScaleFactor(2, 0, 0); |
| 27 else |
| 28 testFailed('This test requires window.eventSender.setPageScaleFactor to be
available.'); |
| 29 |
| 30 awaitCompsitingUpdate(function(){ |
| 31 nonFastScrollableRects = window.internals.nonFastScrollableRects(document)
; |
| 32 shouldBe('nonFastScrollableRects.length', '1'); |
| 33 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[110, 11
0, 120, 120]'); |
| 34 |
| 35 drawNonFastScrollableRegionOverlays(); |
| 36 |
| 37 finishJSTest(); |
| 38 }); |
| 39 }; |
| 40 </script> |
OLD | NEW |