Index: third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html |
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c63b4404ee1e9030ddabea97e0e9522d4f6bdd7 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-with-local-background-and-text.html |
@@ -0,0 +1,37 @@ |
+<script> |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+onload = function() { |
+ // Double rAF to ensure content is painted before scroll. |
+ requestAnimationFrame(function() { |
+ requestAnimationFrame(scrollToBottom); |
+ }); |
+} |
+ |
+function scrollToBottom() { |
+ document.getElementById('scroller').scrollTop = 500; |
+ if (window.testRunner) |
+ window.testRunner.notifyDone(); |
+} |
+</script> |
+<style> |
+#scroller { |
+ background: gray local; |
+ border: 10px solid green; |
+ overflow: scroll; |
+ width: 200px; |
+ height: 200px; |
+ will-change: transform; |
+} |
+ |
+#spacer { |
+ height: 500px; |
+} |
+</style> |
+<!-- Test that the background is correctly repainted when the scrolled content |
+ grows in size. --> |
+<div id="scroller"> |
+ <div id="spacer"></div> |
+ <p>Text content</p> |
+</div> |