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

Unified Diff: ui/compositor/layer_animator_unittest.cc

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add missing include 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: ui/compositor/layer_animator_unittest.cc
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc
index 23052d7af032454da629fea8e941677741fab185..54def05b0f7a8c08adc74496d177af80def34fa6 100644
--- a/ui/compositor/layer_animator_unittest.cc
+++ b/ui/compositor/layer_animator_unittest.cc
@@ -20,6 +20,7 @@
#include "ui/compositor/test/test_layer_animation_delegate.h"
#include "ui/compositor/test/test_layer_animation_observer.h"
#include "ui/compositor/test/test_utils.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
@@ -168,7 +169,7 @@ TEST(LayerAnimatorTest, ImplicitAnimation) {
animator->set_disable_timer_for_test(true);
TestLayerAnimationDelegate delegate;
animator->SetDelegate(&delegate);
- base::TimeTicks now = base::TimeTicks::Now();
+ base::TimeTicks now = gfx::FrameTime::Now();
animator->SetBrightness(0.5);
EXPECT_TRUE(animator->is_animating());
element->Step(now + base::TimeDelta::FromSeconds(1));
@@ -1035,7 +1036,7 @@ TEST(LayerAnimatorTest, StartTogetherSetsLastStepTime) {
// miniscule (fractions of a millisecond). If set correctly, then the delta
// should be enormous. Arbitrarily choosing 1 minute as the threshold,
// though a much smaller value would probably have sufficed.
- delta = base::TimeTicks::Now() - animator->last_step_time();
+ delta = gfx::FrameTime::Now() - animator->last_step_time();
EXPECT_GT(60.0, delta.InSecondsF());
}

Powered by Google App Engine
This is Rietveld 408576698