blob: 3db9d602095d9f7f23878feb900b2a1171385f14 [file] [log] [blame]
<!DOCTYPE html>
<style>
iframe {
position: absolute;
left: 200px;
top: 200px;
height: 120px;
width: 120px;
padding: 10px;
border: none;
transform: scale(2);
}
</style>
<iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px; height:1000px;'><p style='font-size: 6px'>Should be covered by a green overlay.</p></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 a CSS scale transformation is applied.');
onload = function() {
runAfterLayoutAndPaint(function(){
nonFastScrollableRects = window.internals.nonFastScrollableRects(document);
shouldBe('nonFastScrollableRects.length', '1');
shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[150, 150, 240, 240]');
drawNonFastScrollableRegionOverlays();
finishJSTest();
});
};
</script>