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

Unified Diff: ui/gfx/animation/slide_animation_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
« no previous file with comments | « ui/gfx/animation/multi_animation_unittest.cc ('k') | ui/gfx/animation/throb_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/animation/slide_animation_unittest.cc
diff --git a/ui/gfx/animation/slide_animation_unittest.cc b/ui/gfx/animation/slide_animation_unittest.cc
index 9d4f5343db13be85c46bc71daa6653b62da00014..dd8829baa838a5f0d48120efa470c9d91b22e7d9 100644
--- a/ui/gfx/animation/slide_animation_unittest.cc
+++ b/ui/gfx/animation/slide_animation_unittest.cc
@@ -16,11 +16,11 @@ class SlideAnimation::TestApi {
public:
explicit TestApi(SlideAnimation* animation) : animation_(animation) {}
- void SetStartTime(base::TimeTicks ticks) {
+ void SetStartTime(gfx::FrameTime ticks) {
animation_->SetStartTime(ticks);
}
- void Step(base::TimeTicks ticks) {
+ void Step(gfx::FrameTime ticks) {
animation_->Step(ticks);
}
@@ -69,8 +69,8 @@ TEST_F(SlideAnimationTest, Basics) {
EXPECT_FALSE(animation.IsClosing());
// Simulate running the animation.
- test_api.SetStartTime(base::TimeTicks());
- test_api.Step(base::TimeTicks() + base::TimeDelta::FromMilliseconds(50));
+ test_api.SetStartTime(gfx::FrameTime());
+ test_api.Step(gfx::FrameTime() + base::TimeDelta::FromMilliseconds(50));
EXPECT_EQ(0.5, animation.GetCurrentValue());
// We can start hiding mid-way through the animation.
« no previous file with comments | « ui/gfx/animation/multi_animation_unittest.cc ('k') | ui/gfx/animation/throb_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698