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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2006103004: Send takeover msg from MT to CC using the animation path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jbroman nits Created 4 years, 7 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 402a94ec3955b520b8f2caf9f2b6f00779e29798..ea29c049f6832e41482b133e09006a2dc4599af8 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -9736,8 +9736,8 @@ TEST_F(LayerTreeHostImplTimelinesTest, ScrollAnimatedAborted) {
host_impl_->DidFinishImplFrame();
}
-// Test that a smooth scroll offset animation is marked finished when a main
-// thread scrolling reason is added. The animation is then finished on the
+// Test that a smooth scroll offset animation is marked finished when aborted
+// with the needs_completion flag. The animation is then finished on the
// main thread.
TEST_F(LayerTreeHostImplTimelinesTest,
ScrollAnimatedFinishedByMainThreadScrollingReason) {
@@ -9780,13 +9780,12 @@ TEST_F(LayerTreeHostImplTimelinesTest,
float y = scrolling_layer->CurrentScrollOffset().y();
EXPECT_TRUE(y > 1 && y < 49);
- // Add main thread scrolling reason.
- scrolling_layer->set_main_thread_scrolling_reasons(
- MainThreadScrollingReason::kHasNonLayerViewportConstrainedObjects);
+ // Abort animation.
+ host_impl_->animation_host()->ScrollAnimationAbort(true /*needs_completion*/);
host_impl_->UpdateAnimationState(true);
- // The main thread scrolling reason should have marked the smooth scroll
- // animation as finished.
+ // Aborting with the needs completion param should have marked the smooth
+ // scroll animation as finished.
EXPECT_FALSE(host_impl_->animation_host()->HasActiveAnimationForTesting(
scrolling_layer->id()));
EXPECT_TRUE(y > 1 && y < 49);
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698