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

Unified Diff: cc/scheduler/delay_based_time_source_unittest.cc

Issue 25819002: Revert 210101 "cc: Fix and simplify DelayBasedTimeSource" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599_59/src/
Patch Set: 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/scheduler/delay_based_time_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/delay_based_time_source_unittest.cc
===================================================================
--- cc/scheduler/delay_based_time_source_unittest.cc (revision 226616)
+++ cc/scheduler/delay_based_time_source_unittest.cc (working copy)
@@ -88,7 +88,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -109,7 +109,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -122,7 +122,7 @@
}
// At 60Hz, when the tick returns at exactly 2*interval after the requested next
-// time, make sure a 0ms next delay is posted.
+// time, make sure a 16ms next delay is posted.
TEST(DelayBasedTimeSource, NextDelaySaneWhenExactlyTwiceAfterRequestedTime) {
scoped_refptr<base::TestSimpleTaskRunner> task_runner =
new base::TestSimpleTaskRunner;
@@ -131,7 +131,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -139,7 +139,7 @@
timer->SetNow(timer->Now() + 2 * Interval());
task_runner->RunPendingTasks();
- EXPECT_EQ(0, task_runner->NextPendingTaskDelay().InMilliseconds());
+ EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
}
// At 60Hz, when the tick returns at 2*interval and a bit after the requested
@@ -152,7 +152,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -174,7 +174,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -196,7 +196,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -227,7 +227,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
@@ -271,7 +271,7 @@
FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
timer->SetClient(&client);
timer->SetActive(true);
- // Run the first tick.
+ // Run the first task, as that activates the timer and picks up a timebase.
task_runner->RunPendingTasks();
EXPECT_EQ(16, task_runner->NextPendingTaskDelay().InMilliseconds());
« no previous file with comments | « cc/scheduler/delay_based_time_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698