Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / image-rescale-scroll.html
blob7de634435e8d1309d7dd8e12130fb073da567869
1 <html>
2 <!--
3 This test checks for the regression bug that causes white, horizontal blank bars
4 to occur when scrolling scaled images in Chromium. Since test_shell implements scrolling
5 differently than Chrome, we simulate scrolling by occluding part of the image, and
6 verifying it repaints correctly when the occlusion is removed. The image must straddle
7 the bottom edge of the window with no more than about 20% visible in order to force
8 ImageSkia to do a partial load, as this is a precondition of the regression.
9 -->
10 <script type='text/javascript'>
12 function doScroll()
14 // Remove occlusion after initial page draw.
15 var occluder = document.getElementById('occluder');
16 occluder.style.top = 600;
18 if (window.testRunner)
19 testRunner.notifyDone();
22 if (window.testRunner)
23 testRunner.waitUntilDone();
25 </script>
26 <body onLoad="doScroll();" style="overflow:hidden;">
27 <p>This test verifies correct repaint of scrolled/re-painted-after-uncovering, scaled images.</p>
28 <p>If successful, the image below extends past the bottom of the window, with no white bar
29 occluding the part of the image adjacent to the bottom of the window.</p>
30 <!-- It is important for the image to be loaded with only a small amount showing,
31 as ImageSkia will only do a partial load in this case, which is required to
32 trigger the regression. -->
33 <img id = "pic" src="resources/image-rescale.jpg" width="160" height="105"
34 style="position: absolute; left: 50px; top:580px"
35 > <!-- Rescaled to 1/2 normal size, required to trigger the regression. -->
37 <!-- The div below occludes part of the image. It is removed shortly after the
38 document has loaded, but if the regression is present the image will not
39 repaint correctly. -->
40 <div id="occluder" style="position:absolute; left:0px; top:590px; width:300px; height:10px; background:white;"></div>
41 </body>
42 </html>