Index: LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js |
diff --git a/LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js b/LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js |
index c27dc9b30318d13fae3e97e0643de29a26c65e31..09fa4c9060d75387cfc4ae686ab210e00f69ddf7 100644 |
--- a/LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js |
+++ b/LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js |
@@ -47,6 +47,14 @@ SmoothScrollInterruptionTest.prototype.startNextTestCase = function() { |
var scrollStartPoint = this.scrollStartPoint; |
scrollElement.scrollTop = scrollStartPoint; |
+ window.requestAnimationFrame(this.performSmoothScroll.bind(this)); |
+} |
+ |
+SmoothScrollInterruptionTest.prototype.performSmoothScroll = function() { |
+ var testCase = this.testCases[this.currentTestCase]; |
+ var scrollElement = this.scrollElement; |
+ var scrollStartPoint = this.scrollStartPoint; |
+ |
this.jsScroll(this.scrollEndPoint); |
this.asyncTest.step(function() { |
assert_equals(scrollElement.scrollTop, scrollStartPoint); |
@@ -86,7 +94,7 @@ SmoothScrollInterruptionTest.prototype.testCaseComplete = function() { |
} |
SmoothScrollInterruptionTest.prototype.run = function() { |
- setup({explicit_done: true}); |
+ setup({explicit_done: true, explicit_timeout: true}); |
this.startNextTestCase(); |
} |