Index: webkit/dom_storage/dom_storage_area_unittest.cc |
diff --git a/webkit/dom_storage/dom_storage_area_unittest.cc b/webkit/dom_storage/dom_storage_area_unittest.cc |
index 858176a89ab7045b00c735eb7349edf9f95568b1..4513ea309eeb91e5b6f889f765e84c9d36afe775 100644 |
--- a/webkit/dom_storage/dom_storage_area_unittest.cc |
+++ b/webkit/dom_storage/dom_storage_area_unittest.cc |
@@ -183,7 +183,7 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) { |
EXPECT_TRUE(area->commit_batch_.get()); |
EXPECT_EQ(0, area->commit_batches_in_flight_); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->commit_batch_.get()); |
EXPECT_EQ(0, area->commit_batches_in_flight_); |
@@ -232,7 +232,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) { |
EXPECT_TRUE(area->commit_batch_.get()); |
EXPECT_FALSE(area->commit_batch_->clear_all_first); |
EXPECT_EQ(2u, area->commit_batch_->changed_values.size()); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->HasUncommittedChanges()); |
EXPECT_FALSE(area->commit_batch_.get()); |
EXPECT_EQ(0, area->commit_batches_in_flight_); |
@@ -248,7 +248,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) { |
EXPECT_TRUE(area->commit_batch_.get()); |
EXPECT_TRUE(area->commit_batch_->clear_all_first); |
EXPECT_TRUE(area->commit_batch_->changed_values.empty()); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->commit_batch_.get()); |
EXPECT_EQ(0, area->commit_batches_in_flight_); |
// Verify the changes made it to the database. |
@@ -268,7 +268,7 @@ TEST_F(DomStorageAreaTest, CommitTasks) { |
FROM_HERE, |
base::Bind(&DomStorageAreaTest::InjectedCommitSequencingTask, |
base::Unretained(this), area)); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_TRUE(area->HasOneRef()); |
EXPECT_FALSE(area->HasUncommittedChanges()); |
// Verify the changes made it to the database. |
@@ -299,7 +299,7 @@ TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) { |
area->backing_->ReadAllValues(&values); |
EXPECT_TRUE(values.empty()); // not committed yet |
area->Shutdown(); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_TRUE(area->HasOneRef()); |
EXPECT_FALSE(area->backing_.get()); |
// The VerifyChangesCommittedDatabase destructor verifies values |
@@ -327,7 +327,7 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) { |
// Commit something in the database and then delete. |
NullableString16 old_value; |
area->SetItem(kKey, kValue, &old_value); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_TRUE(file_util::PathExists(db_file_path)); |
area->DeleteOrigin(); |
EXPECT_EQ(0u, area->Length()); |
@@ -342,14 +342,14 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) { |
area->DeleteOrigin(); |
EXPECT_TRUE(area->HasUncommittedChanges()); |
EXPECT_EQ(0u, area->Length()); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->HasUncommittedChanges()); |
EXPECT_FALSE(file_util::PathExists(db_file_path)); |
// Put some uncommitted changes to a an existing database in |
// and then delete. |
area->SetItem(kKey, kValue, &old_value); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_TRUE(file_util::PathExists(db_file_path)); |
area->SetItem(kKey2, kValue2, &old_value); |
EXPECT_TRUE(area->HasUncommittedChanges()); |
@@ -357,13 +357,13 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) { |
area->DeleteOrigin(); |
EXPECT_TRUE(area->HasUncommittedChanges()); |
EXPECT_EQ(0u, area->Length()); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->HasUncommittedChanges()); |
// Since the area had uncommitted changes at the time delete |
// was called, the file will linger until the shutdown time. |
EXPECT_TRUE(file_util::PathExists(db_file_path)); |
area->Shutdown(); |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(file_util::PathExists(db_file_path)); |
} |
@@ -407,7 +407,7 @@ TEST_F(DomStorageAreaTest, PurgeMemory) { |
EXPECT_EQ(original_map, area->map_.get()); |
// Commit the changes from above, |
- MessageLoop::current()->RunAllPending(); |
+ MessageLoop::current()->RunUntilIdle(); |
EXPECT_FALSE(area->HasUncommittedChanges()); |
new_backing = static_cast<LocalStorageDatabaseAdapter*>( |
area->backing_.get())->db_.get(); |