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

Unified Diff: cc/scheduler/frame_rate_controller_unittest.cc

Issue 12623026: cc: Chromify TimeSource, DelayBasedTimeSource and test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back to doubles 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
« no previous file with comments | « cc/scheduler/frame_rate_controller.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/frame_rate_controller_unittest.cc
diff --git a/cc/scheduler/frame_rate_controller_unittest.cc b/cc/scheduler/frame_rate_controller_unittest.cc
index 833a4925565eac5894746790dca735d210e72423..390e4b097dd2c5608d442428f8b9095a7ac1108e 100644
--- a/cc/scheduler/frame_rate_controller_unittest.cc
+++ b/cc/scheduler/frame_rate_controller_unittest.cc
@@ -50,12 +50,12 @@ TEST(FrameRateControllerTest, TestFrameThrottling_ImmediateAck)
controller.DidBeginFrame();
// Tell the controller the frame ended 5ms later
- timeSource->setNow(timeSource->now() + base::TimeDelta::FromMilliseconds(5));
+ timeSource->setNow(timeSource->Now() + base::TimeDelta::FromMilliseconds(5));
controller.DidFinishFrame();
// Trigger another frame, make sure vsync runs again
elapsed += base::TimeDelta::FromMilliseconds(thread.pendingDelayMs());
- EXPECT_TRUE(elapsed >= timeSource->now()); // Sanity check that previous code didn't move time backward.
+ EXPECT_TRUE(elapsed >= timeSource->Now()); // Sanity check that previous code didn't move time backward.
timeSource->setNow(elapsed);
thread.runPendingTask();
EXPECT_TRUE(client.vsyncTicked());
@@ -87,7 +87,7 @@ TEST(FrameRateControllerTest, TestFrameThrottling_TwoFramesInFlight)
// Trigger another frame, make sure vsync callback runs again
elapsed += base::TimeDelta::FromMilliseconds(thread.pendingDelayMs());
- EXPECT_TRUE(elapsed >= timeSource->now()); // Sanity check that previous code didn't move time backward.
+ EXPECT_TRUE(elapsed >= timeSource->Now()); // Sanity check that previous code didn't move time backward.
timeSource->setNow(elapsed);
thread.runPendingTask();
EXPECT_TRUE(client.vsyncTicked());
@@ -98,13 +98,13 @@ TEST(FrameRateControllerTest, TestFrameThrottling_TwoFramesInFlight)
// Trigger another frame. Since two frames are pending, we should not draw.
elapsed += base::TimeDelta::FromMilliseconds(thread.pendingDelayMs());
- EXPECT_TRUE(elapsed >= timeSource->now()); // Sanity check that previous code didn't move time backward.
+ EXPECT_TRUE(elapsed >= timeSource->Now()); // Sanity check that previous code didn't move time backward.
timeSource->setNow(elapsed);
thread.runPendingTask();
EXPECT_FALSE(client.vsyncTicked());
// Tell the controller the first frame ended 5ms later
- timeSource->setNow(timeSource->now() + base::TimeDelta::FromMilliseconds(5));
+ timeSource->setNow(timeSource->Now() + base::TimeDelta::FromMilliseconds(5));
controller.DidFinishFrame();
// Tick should not have been called
@@ -112,7 +112,7 @@ TEST(FrameRateControllerTest, TestFrameThrottling_TwoFramesInFlight)
// Trigger yet another frame. Since one frames is pending, another vsync callback should run.
elapsed += base::TimeDelta::FromMilliseconds(thread.pendingDelayMs());
- EXPECT_TRUE(elapsed >= timeSource->now()); // Sanity check that previous code didn't move time backward.
+ EXPECT_TRUE(elapsed >= timeSource->Now()); // Sanity check that previous code didn't move time backward.
timeSource->setNow(elapsed);
thread.runPendingTask();
EXPECT_TRUE(client.vsyncTicked());
« no previous file with comments | « cc/scheduler/frame_rate_controller.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698