blob: 402688cc3597d8b3bdbcd07197542c6a5218a8d9 [file] [log] [blame]
<!-- Based on fast/images/fixed-img-src-change-after-scroll.html -->
<!DOCTYPE html>
<script src="resources/paint-invalidation-test.js"></script>
window.expectedPaintInvalidationObjects = [
"LayoutImage (positioned) IMG id='img'",
function paintInvalidationTest() {
window.scrollTo(0, 1000);
document.getElementById('img').src = '../../../fast/images/resources/green.jpg';
onload = runPaintInvalidationTest;
<body style="height: 2000px">
Checks correct paint invalidation on image src change after a pending scroll.
Passes if there is no assert failure about pending scroll offsets in a debug build
(, and both the old location and new location of the img are
correctly invalidated.
<img id='img' style="width: 100px; height: 100px; position: fixed; top: 50px; left: 0">