| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="resources/repaint.js" type="text/javascript"></script> |
| <script> |
| function repaintTest() { |
| // Now scroll once in the #innerDiv to the green area. |
| if (window.eventSender) |
| eventSender.mouseScrollBy(0, -10); |
| } |
| window.addEventListener("load", runRepaintTest, false); |
| </script> |
| </head> |
| <body> |
| <!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element being scrolled off page using javascript. --> |
| <!-- For the test to pass you should not see any RED or PURPLE, only green --> |
| <div style="height: 300px; overflow-y: scroll;" id="outerDiv"> |
| <div style="height: 300px; background: purple;"></div> |
| <div style="height: 400px; overflow-y: scroll;" id="innerDiv"> |
| <table> |
| <tr><td style="height: 400px; width: 300px; background: red"></td></tr> |
| <tr><td style="height: 400px; width: 300px; background: green"></td></tr> |
| </table> |
| </div> |
| </div> |
| <script> |
| if (window.eventSender) { |
| testRunner.dumpAsText(true); |
| |
| // Scroll the #outerDiv until we reach the #innerDiv. |
| eventSender.mouseMoveTo(50, 50); |
| eventSender.mouseScrollBy(0, -8); |
| } else { |
| document.write("This test is better run under DumpRenderTree. To manually test it, continuously scroll down on the top-most element. There should be no repaint issue."); |
| } |
| </script> |
| </body> |
| </html> |