blob: b417a54c88407b27322dd6a95efb07b5ac90bb0b [file] [log] [blame]
<!DOCTYPE html>
<style>
iframe {
position: absolute;
left: 100px;
top: 100px;
height: 120px;
width: 120px;
padding: 10px;
border: none;
}
</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>
<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>