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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html

Issue 2511473003: Round the scroll offset synced back to main instead of flooring. (Closed)
Patch Set: Wait for scroll animation to complete before checking main thread scrolling reasons. Created 4 years, 1 month 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: third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html
index bc899ce9aa76450e0b3be5f192a48101e2e01da0..3243d0e44c2a992f94a0bfd8aaedec035dbfd7a8 100644
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html
@@ -15,10 +15,12 @@ description("This test verifies that smooth scrolls initiated on the main " +
// From ScrollingCoordinator::mainThreadScrollingReasonsAsText.
var ANIMATING_TEXT = "Handling scroll from main thread";
+var IDLE = "Idle";
var RUNNING_ON_COMPOSITOR = "RunningOnCompositor";
function finishTest() {
requestAnimationFrame(function() {
+ shouldBe("document.scrollingElement.scrollTop", "40");
// Check that main thread scrolling reason is removed.
shouldBeTrue("internals.mainThreadScrollingReasons(document) == ''");
finishJSTest();
@@ -31,12 +33,13 @@ function runTest() {
} else {
// Check that initiated by main thread and running on the compositor.
shouldBe("internals.getScrollAnimationState(document)",
- "RUNNING_ON_COMPOSITOR");
+ "RUNNING_ON_COMPOSITOR");
// Check that main thread scrolling reason is added.
shouldBe("internals.mainThreadScrollingReasons(document)",
- "ANIMATING_TEXT");
- shouldBecomeEqual("document.scrollingElement.scrollTop == 40",
- "true", finishTest);
+ "ANIMATING_TEXT");
+ // Wait for scroll animation to complete.
+ shouldBecomeEqual("internals.getScrollAnimationState(document)",
+ "IDLE", finishTest);
}
}

Powered by Google App Engine
This is Rietveld 408576698