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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 571873003: [Android]Optimization of scrollbar animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« cc/layers/layer_impl.cc ('K') | « cc/layers/scrollbar_layer_impl_base.cc ('k') | no next file » | 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 94ecb174c14ba231f2878b3986533fa04bbc50a7..9e63fad82d87448da4d85c965d6da37f423cab13 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -1359,7 +1359,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
// After a scroll, a fade animation should be scheduled about 20ms from now.
host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel);
- host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(5, 0));
+ host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0, 5));
host_impl_->ScrollEnd();
did_request_redraw_ = false;
did_request_animate_ = false;
@@ -1386,6 +1386,12 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) {
EXPECT_FALSE(did_request_redraw_);
EXPECT_FALSE(did_request_animate_);
requested_scrollbar_animation_delay_ = base::TimeDelta();
+
+ // Unnecessarily Fade animation of solid color scrollbar is not triggered.
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel);
+ host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(5, 0));
+ host_impl_->ScrollEnd();
+ EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_);
}
TEST_F(LayerTreeHostImplTest, ScrollbarFadePinchZoomScrollbars) {
« cc/layers/layer_impl.cc ('K') | « cc/layers/scrollbar_layer_impl_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698