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

Unified Diff: net/disk_cache/disk_cache_perftest.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/backend_unittest.cc ('k') | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_perftest.cc
diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/disk_cache_perftest.cc
index 100d89b3c43ff29f1483ed87d33f2936659bbc89..daeb6770b91d5fe02c89141c183a8db13aa4aad6 100644
--- a/net/disk_cache/disk_cache_perftest.cc
+++ b/net/disk_cache/disk_cache_perftest.cc
@@ -11,6 +11,7 @@
#include "base/files/file_path.h"
#include "base/hash.h"
#include "base/process/process_metrics.h"
+#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/perf_time_logger.h"
#include "base/test/test_file_util.h"
@@ -207,7 +208,7 @@ TEST_F(DiskCachePerfTest, BlockfileHashes) {
}
void DiskCachePerfTest::ResetAndEvictSystemDiskCache() {
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
cache_.reset();
// Flush all files in the cache out of system memory.
@@ -237,7 +238,7 @@ void DiskCachePerfTest::CacheBackendPerformance() {
EXPECT_TRUE(TimeWrite());
disk_cache::SimpleBackendImpl::FlushWorkerPoolForTesting();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ResetAndEvictSystemDiskCache();
EXPECT_TRUE(TimeRead(WhatToRead::HEADERS_ONLY,
@@ -246,7 +247,7 @@ void DiskCachePerfTest::CacheBackendPerformance() {
"Read disk cache headers only (warm)"));
disk_cache::SimpleBackendImpl::FlushWorkerPoolForTesting();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ResetAndEvictSystemDiskCache();
EXPECT_TRUE(
@@ -255,7 +256,7 @@ void DiskCachePerfTest::CacheBackendPerformance() {
TimeRead(WhatToRead::HEADERS_AND_BODY, "Read disk cache entries (warm)"));
disk_cache::SimpleBackendImpl::FlushWorkerPoolForTesting();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(DiskCachePerfTest, CacheBackendPerformance) {
@@ -311,7 +312,7 @@ TEST_F(DiskCachePerfTest, BlockFilesPerformance) {
}
timer2.Done();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
} // namespace
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698