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

Unified Diff: cc/input/top_controls_manager_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: Fix DCHECK 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 | « cc/input/top_controls_manager.cc ('k') | cc/layers/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/top_controls_manager_unittest.cc
diff --git a/cc/input/top_controls_manager_unittest.cc b/cc/input/top_controls_manager_unittest.cc
index da7475f576c0ce4f0de0ac3d040b5ee3c9f8e76d..b16e2ca4622a629bd07b60d996d70e43bcad68ee 100644
--- a/cc/input/top_controls_manager_unittest.cc
+++ b/cc/input/top_controls_manager_unittest.cc
@@ -12,6 +12,7 @@
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gfx/vector2d_f.h"
namespace cc {
@@ -131,7 +132,7 @@ TEST(TopControlsManagerTest, PartialShownHideAnimation) {
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -161,7 +162,7 @@ TEST(TopControlsManagerTest, PartialShownShowAnimation) {
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -187,7 +188,7 @@ TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdShows) {
manager->ScrollEnd();
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -213,7 +214,7 @@ TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdHides) {
manager->ScrollEnd();
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -243,7 +244,7 @@ TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdHides) {
manager->ScrollEnd();
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -273,7 +274,7 @@ TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdShows) {
manager->ScrollEnd();
EXPECT_TRUE(manager->animation());
- base::TimeTicks time = base::TimeTicks::Now();
+ base::TimeTicks time = gfx::FrameTime::Now();
float previous_offset = manager->controls_top_offset();
while (manager->animation()) {
time = base::TimeDelta::FromMicroseconds(100) + time;
« no previous file with comments | « cc/input/top_controls_manager.cc ('k') | cc/layers/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698