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

Unified Diff: cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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/animation/scrollbar_animation_controller_linear_fade_unittest.cc
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
index b4c1160b081bae8f1cc600f8c4335e0efed434fa..e00469edba68f009c8f74b36e3998cc75289c368 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
+++ b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
@@ -8,6 +8,7 @@
#include "cc/test/fake_impl_proxy.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/frame_time.h"
namespace cc {
namespace {
@@ -40,7 +41,7 @@ class ScrollbarAnimationControllerLinearFadeTest : public testing::Test {
};
TEST_F(ScrollbarAnimationControllerLinearFadeTest, HiddenInBegin) {
- scrollbar_controller_->Animate(base::TimeTicks());
+ scrollbar_controller_->Animate(gfx::FrameTime());
EXPECT_FLOAT_EQ(0.0f, scrollbar_layer_->opacity());
}
@@ -48,10 +49,10 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest,
HiddenAfterNonScrollingGesture) {
scrollbar_controller_->DidScrollGestureBegin();
EXPECT_FALSE(scrollbar_controller_->IsAnimating());
- EXPECT_FALSE(scrollbar_controller_->Animate(base::TimeTicks()));
+ EXPECT_FALSE(scrollbar_controller_->Animate(gfx::FrameTime()));
EXPECT_FLOAT_EQ(0.0f, scrollbar_layer_->opacity());
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(100);
EXPECT_FALSE(scrollbar_controller_->Animate(time));
EXPECT_FLOAT_EQ(0.0f, scrollbar_layer_->opacity());
@@ -64,7 +65,7 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest,
}
TEST_F(ScrollbarAnimationControllerLinearFadeTest, AwakenByScrollingGesture) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
scrollbar_controller_->DidScrollGestureBegin();
scrollbar_controller_->Animate(time);
@@ -128,7 +129,7 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest, AwakenByScrollingGesture) {
}
TEST_F(ScrollbarAnimationControllerLinearFadeTest, AwakenByProgrammaticScroll) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
EXPECT_TRUE(scrollbar_controller_->DidScrollUpdate(time));
EXPECT_TRUE(scrollbar_controller_->IsAnimating());
@@ -182,7 +183,7 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest, AwakenByProgrammaticScroll) {
TEST_F(ScrollbarAnimationControllerLinearFadeTest,
AnimationPreservedByNonScrollingGesture) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
EXPECT_TRUE(scrollbar_controller_->DidScrollUpdate(time));
EXPECT_TRUE(scrollbar_controller_->IsAnimating());
@@ -212,7 +213,7 @@ TEST_F(ScrollbarAnimationControllerLinearFadeTest,
TEST_F(ScrollbarAnimationControllerLinearFadeTest,
AnimationOverriddenByScrollingGesture) {
- base::TimeTicks time;
+ gfx::FrameTime time;
time += base::TimeDelta::FromSeconds(1);
EXPECT_TRUE(scrollbar_controller_->DidScrollUpdate(time));
EXPECT_TRUE(scrollbar_controller_->IsAnimating());
« no previous file with comments | « cc/animation/scrollbar_animation_controller_linear_fade.cc ('k') | cc/animation/scrollbar_animation_controller_thinning.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698