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

Unified Diff: base/timer/timer_unittest.cc

Issue 2837863004: Use base::OneShotTimer instead of base::Timer(false, false)
Patch Set: rebase Created 3 years, 8 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 | « no previous file | components/component_updater/timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer/timer_unittest.cc
diff --git a/base/timer/timer_unittest.cc b/base/timer/timer_unittest.cc
index 69338eb211b52c32e0bc31250c515597c30d02ca..11e224efd882c4cea3133c4c9b32b5f783212682 100644
--- a/base/timer/timer_unittest.cc
+++ b/base/timer/timer_unittest.cc
@@ -607,7 +607,7 @@ void TimerTestCallback() {
TEST(TimerTest, NonRepeatIsRunning) {
{
MessageLoop loop;
- Timer timer(false, false);
+ OneShotTimer timer;
EXPECT_FALSE(timer.IsRunning());
timer.Start(FROM_HERE, TimeDelta::FromDays(1), Bind(&TimerTestCallback));
EXPECT_TRUE(timer.IsRunning());
@@ -631,7 +631,7 @@ TEST(TimerTest, NonRepeatIsRunning) {
}
TEST(TimerTest, NonRepeatMessageLoopDeath) {
- Timer timer(false, false);
+ OneShotTimer timer;
{
MessageLoop loop;
EXPECT_FALSE(timer.IsRunning());
@@ -694,7 +694,7 @@ TEST(TimerTest, ContinuationStopStart) {
{
ClearAllCallbackHappened();
MessageLoop loop;
- Timer timer(false, false);
+ OneShotTimer timer;
timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
Bind(&SetCallbackHappened1));
timer.Stop();
@@ -710,7 +710,7 @@ TEST(TimerTest, ContinuationReset) {
{
ClearAllCallbackHappened();
MessageLoop loop;
- Timer timer(false, false);
+ OneShotTimer timer;
timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
Bind(&SetCallbackHappened1));
timer.Reset();
« no previous file with comments | « no previous file | components/component_updater/timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698