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

Unified Diff: cc/scrollbar_animation_controller_linear_fade_unittest.cc

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 187970 and update test Created 7 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/scrollbar_animation_controller_linear_fade_unittest.cc
diff --git a/cc/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/scrollbar_animation_controller_linear_fade_unittest.cc
index e3c2c230f16c1ab0f67d28e6d32ba2cb10de8377..a5c388019a335e1dd0853bfca0327ad21122ed7e 100644
--- a/cc/scrollbar_animation_controller_linear_fade_unittest.cc
+++ b/cc/scrollbar_animation_controller_linear_fade_unittest.cc
@@ -101,14 +101,14 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyAwakenByScroll)
EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity());
}
-TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyForceAwakenByPinch)
+TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyAwakenByPinch)
{
base::TimeTicks time;
+ time += base::TimeDelta::FromSeconds(1);
m_scrollbarController->didPinchGestureUpdate(time);
m_scrollbarController->animate(time);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
- time += base::TimeDelta::FromSeconds(1);
m_scrollbarController->animate(time);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
@@ -128,14 +128,14 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyForceAwakenByPinch)
time += base::TimeDelta::FromSeconds(1);
m_scrollbarController->animate(time);
- EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity());
time += base::TimeDelta::FromSeconds(1);
m_scrollbarController->animate(time);
- EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity());
time += base::TimeDelta::FromSeconds(1);
- m_scrollbarController->didPinchGestureEnd(time);
+ m_scrollbarController->didPinchGestureUpdate(time);
m_scrollbarController->animate(time);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());

Powered by Google App Engine
This is Rietveld 408576698