Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js

Issue 802383003: Run CSSOM smooth scroll animations on the compositor when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698