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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_win_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
Index: net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
index 77560210fce31a4d0c4a5b6fefd506642d661e6e..40bc928647b2cafd3c89f7f0199319c606132bbc 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
@@ -8,8 +8,8 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
+#include "base/run_loop.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
#include "base/timer/elapsed_timer.h"
@@ -93,9 +93,9 @@ class RealFetchTester {
void WaitUntilDone() {
while (!finished_) {
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Attempts to give worker threads time to finish. This is currently
@@ -138,7 +138,7 @@ TEST(DhcpProxyScriptFetcherWin, RealFetchWithCancel) {
// exercises the code without stubbing out dependencies.
RealFetchTester fetcher;
fetcher.RunTestWithCancel();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// Attempt to avoid Valgrind leak reports in case worker thread is
// still running.
@@ -389,16 +389,16 @@ class FetcherClient {
void RunMessageLoopUntilComplete() {
while (!finished_) {
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void RunMessageLoopUntilWorkerDone() {
DCHECK(fetcher_.adapter_query_.get());
while (!fetcher_.worker_finished_event_.TimedWait(
base::TimeDelta::FromMilliseconds(10))) {
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
}
« no previous file with comments | « net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc ('k') | net/proxy/multi_threaded_proxy_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698