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

Unified Diff: LayoutTests/fast/scroll-behavior/resources/scroll-behavior-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-behavior-test.js
diff --git a/LayoutTests/fast/scroll-behavior/resources/scroll-behavior-test.js b/LayoutTests/fast/scroll-behavior/resources/scroll-behavior-test.js
index 6ed5b3b7fc899698964eab9f7641049b8a608a91..6506ff9619e1ed741640ee4e64bc5f0eaf468735 100644
--- a/LayoutTests/fast/scroll-behavior/resources/scroll-behavior-test.js
+++ b/LayoutTests/fast/scroll-behavior/resources/scroll-behavior-test.js
@@ -36,8 +36,13 @@ ScrollBehaviorTest.prototype.scrollListener = function(testCase) {
// Wait for an intermediate frame, then instant-scroll to the end state.
if ((this.scrollElement.scrollLeft != testCase.startX || this.scrollElement.scrollTop != testCase.startY) &&
(this.scrollElement.scrollLeft != testCase.endX || this.scrollElement.scrollTop != testCase.endY)) {
+ // Instant scroll, and then wait for the next scroll event. This allows
+ // the instant scroll to propagate to the compositor (when using
+ // composited scrolling) so that the next smooth scroll starts at this
+ // position (the compositor always starts smooth scrolls at the current
+ // scroll position on the compositor thread).
this.scrollElement.scrollTo({left: testCase.endX, top: testCase.endY, behavior: "instant"});
- this.testCaseComplete();
+ testCase.waitForEnd = true;
}
};
@@ -95,7 +100,7 @@ ScrollBehaviorTest.prototype.testCaseComplete = function() {
}
ScrollBehaviorTest.prototype.run = function() {
- setup({explicit_done: true});
+ setup({explicit_done: true, explicit_timeout: true});
this.startNextTestCase();
}
« no previous file with comments | « LayoutTests/VirtualTestSuites ('k') | LayoutTests/fast/scroll-behavior/resources/scroll-interruption-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698