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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 2053133002: Remove MessageLoop::current()->RunUntilIdle() in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « net/disk_cache/disk_cache_perftest.cc ('k') | net/http/disk_cache_based_quic_server_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 07e7b2ae671d1d3acf902c324d7173232eeecc5b..e9c701dcdc1d0513f11876eae7867ece4f719626 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2153,7 +2153,7 @@ void DiskCacheEntryTest::DoomSparseEntry() {
// Make sure we do all needed work. This may fail for entry2 if between Close
// and DoomEntry the system decides to remove all traces of the file from the
// system cache so we don't see that there is pending IO.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
if (memory_only_) {
EXPECT_EQ(0, cache_->GetEntryCount());
@@ -2163,7 +2163,7 @@ void DiskCacheEntryTest::DoomSparseEntry() {
// (it's always async on Posix so it is easy to miss). Unfortunately we
// don't have any signal to watch for so we can only wait.
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(500));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
EXPECT_EQ(0, cache_->GetEntryCount());
}
@@ -3034,7 +3034,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheOptimistic4) {
// Finish running the pending tasks so that we fully complete the close
// operation and destroy the entry object.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// At this point the |entry| must have been destroyed, and called
// RemoveSelfFromBackend().
@@ -3208,7 +3208,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheCreateDoomRace) {
// Finish running the pending tasks so that we fully complete the close
// operation and destroy the entry object.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
for (int i = 0; i < disk_cache::kSimpleEntryFileCount; ++i) {
base::FilePath entry_file_path = cache_path_.AppendASCII(
@@ -4056,7 +4056,7 @@ TEST_F(DiskCacheEntryTest, SimpleCachePreserveActiveEntries) {
// one ref; this indicates the IO operation is complete.
while (!entry1_refptr->HasOneRef()) {
base::PlatformThread::YieldCurrentThread();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
entry1_refptr = NULL;
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/http/disk_cache_based_quic_server_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698