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

Unified Diff: cc/input/scrollbar_animation_controller_unittest.cc

Issue 2762123004: cc: LayerTreeHostImpl uses element id to tick animations (Closed)
Patch Set: review comments Created 3 years, 9 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: cc/input/scrollbar_animation_controller_unittest.cc
diff --git a/cc/input/scrollbar_animation_controller_unittest.cc b/cc/input/scrollbar_animation_controller_unittest.cc
index 241aa90f6317a3b6188a26f35c29e8d24db478f3..c4fda1a43c8331c22fcf7fe807f678215b20f1ef 100644
--- a/cc/input/scrollbar_animation_controller_unittest.cc
+++ b/cc/input/scrollbar_animation_controller_unittest.cc
@@ -1185,11 +1185,7 @@ class VerticalScrollbarAnimationControllerAndroidTest
};
TEST_F(ScrollbarAnimationControllerAndroidTest, DelayAnimationOnResize) {
- scrollbar_layer_->layer_tree_impl()
- ->property_trees()
- ->effect_tree.OnOpacityAnimated(0.0f,
- scrollbar_layer_->effect_tree_index(),
- scrollbar_layer_->layer_tree_impl());
+ scrollbar_layer_->SetOverlayScrollbarLayerOpacityAnimated(0.f);
// We should use the gesture delay rather than the resize delay if we're in a
// gesture scroll, even if it is resizing.
scrollbar_controller_->DidScrollBegin();
@@ -1199,11 +1195,7 @@ TEST_F(ScrollbarAnimationControllerAndroidTest, DelayAnimationOnResize) {
EXPECT_FLOAT_EQ(1.0f, scrollbar_layer_->Opacity());
EXPECT_EQ(delay_, base::TimeDelta::FromSeconds(2));
- scrollbar_layer_->layer_tree_impl()
- ->property_trees()
- ->effect_tree.OnOpacityAnimated(0.0f,
- scrollbar_layer_->effect_tree_index(),
- scrollbar_layer_->layer_tree_impl());
+ scrollbar_layer_->SetOverlayScrollbarLayerOpacityAnimated(0.f);
scrollbar_controller_->DidResize();
// Delay animation on resize to 5 seconds.
EXPECT_FLOAT_EQ(1.0f, scrollbar_layer_->Opacity());
@@ -1211,22 +1203,14 @@ TEST_F(ScrollbarAnimationControllerAndroidTest, DelayAnimationOnResize) {
}
TEST_F(ScrollbarAnimationControllerAndroidTest, HiddenInBegin) {
- scrollbar_layer_->layer_tree_impl()
- ->property_trees()
- ->effect_tree.OnOpacityAnimated(0.0f,
- scrollbar_layer_->effect_tree_index(),
- scrollbar_layer_->layer_tree_impl());
+ scrollbar_layer_->SetOverlayScrollbarLayerOpacityAnimated(0.f);
scrollbar_controller_->Animate(base::TimeTicks());
EXPECT_FLOAT_EQ(0.0f, scrollbar_layer_->Opacity());
}
TEST_F(ScrollbarAnimationControllerAndroidTest,
HiddenAfterNonScrollingGesture) {
- scrollbar_layer_->layer_tree_impl()
- ->property_trees()
- ->effect_tree.OnOpacityAnimated(0.0f,
- scrollbar_layer_->effect_tree_index(),
- scrollbar_layer_->layer_tree_impl());
+ scrollbar_layer_->SetOverlayScrollbarLayerOpacityAnimated(0.f);
scrollbar_controller_->DidScrollBegin();
base::TimeTicks time;

Powered by Google App Engine
This is Rietveld 408576698