blob: a6bddfb5fbe5d857213f50244472b3c6a89584cc [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
iframe {
height: 100px;
width: 100px;
}
</style>
<script>
description('This test makes sure hiding and showing a scrollable iframe ' +
'correctly updates the set of non-fast scrollable rects.');
onload = function() {
if (window.internals) {
var frame = document.getElementById('scrollable-iframe');
document.body.offsetTop; // Force layout
shouldBe('internals.nonFastScrollableRects(document).length', '1');
frame.style.display = 'none';
document.body.offsetTop; // Force layout
shouldBe('internals.nonFastScrollableRects(document).length', '0');
frame.style.display = '';
document.body.offsetTop; // Force layout
shouldBe('internals.nonFastScrollableRects(document).length', '1');
}
}
</script>
<iframe id="scrollable-iframe" src="resources/subframe.html"></iframe>