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

Unified Diff: chrome/common/important_file_writer_unittest.cc

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Explicitly include base/time.h in header file. Created 8 years, 11 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 | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/common/profiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/important_file_writer_unittest.cc
diff --git a/chrome/common/important_file_writer_unittest.cc b/chrome/common/important_file_writer_unittest.cc
index 84d307a1182a001f33317c816fe6ce6c2c5e47f2..f44ce60d7c0ee6d347b10f2b0cc3f9f01975fa33 100644
--- a/chrome/common/important_file_writer_unittest.cc
+++ b/chrome/common/important_file_writer_unittest.cc
@@ -75,8 +75,10 @@ TEST_F(ImportantFileWriterTest, ScheduleWrite) {
DataSerializer serializer("foo");
writer.ScheduleWrite(&serializer);
EXPECT_TRUE(writer.HasPendingWrite());
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(), 100);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(100));
MessageLoop::current()->Run();
EXPECT_FALSE(writer.HasPendingWrite());
ASSERT_TRUE(file_util::PathExists(writer.path()));
@@ -91,8 +93,10 @@ TEST_F(ImportantFileWriterTest, DoScheduledWrite) {
writer.ScheduleWrite(&serializer);
EXPECT_TRUE(writer.HasPendingWrite());
writer.DoScheduledWrite();
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(), 100);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(100));
MessageLoop::current()->Run();
EXPECT_FALSE(writer.HasPendingWrite());
ASSERT_TRUE(file_util::PathExists(writer.path()));
@@ -108,8 +112,10 @@ TEST_F(ImportantFileWriterTest, FLAKY_BatchingWrites) {
writer.ScheduleWrite(&foo);
writer.ScheduleWrite(&bar);
writer.ScheduleWrite(&baz);
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(), 100);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(100));
MessageLoop::current()->Run();
ASSERT_TRUE(file_util::PathExists(writer.path()));
EXPECT_EQ("baz", GetFileContent(writer.path()));
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/common/profiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698