blob: 184dd5607f2cc564305ee9b17b0332a884288714 [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)
internals.setPageScaleFactor(2);
else
testFailed('This test requires internals.setPageScaleFactor to be available.');
runAfterLayoutAndPaint(function(){
nonFastScrollableRects = internals.nonFastScrollableRects(document);
shouldBe('nonFastScrollableRects.length', '1');
shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[110, 110, 120, 120]');
drawNonFastScrollableRegionOverlays();
finishJSTest();
});
};
</script>