blob: 6950de10e267482ef0828c6889dd58f46a346b45 [file] [log] [blame]
<!DOCTYPE html>
<style>
iframe {
position: absolute;
left: 100px;
top: 100px;
height: 120px;
width: 120px;
padding: 10px;
border: none;
}
.spacer {
height: 2000px;
}
</style>
<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>
<div id="console"></div>
<div class="spacer"></div>
<script src="../resources/js-test.js"></script>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script src="resources/non-fast-scrollable-region-testing.js"></script>
<script>
window.jsTestIsAsync = true;
description('This test ensures non-fast scrollable areas are calculated ' +
'correctly when page is scaled.');
onload = function() {
if (window.internals)
window.internals.setPageScaleFactor(2);
else
testFailed('This test requires window.internals.setPageScaleFactor to be available.');
runAfterLayoutAndPaint(function(){
nonFastScrollableRects = window.internals.nonFastScrollableRects(document);
shouldBe('nonFastScrollableRects.length', '1');
shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[110, 110, 120, 120]');
drawNonFastScrollableRegionOverlays();
finishJSTest();
});
};
</script>