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

Unified Diff: net/proxy/dhcp_proxy_script_adapter_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_adapter_fetcher_win_unittest.cc
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
index b7f352c482f05f7deec737cec55b066353ffc2d2..b114eb59deb4bc15805a600bccd7a4065edfd8a6 100644
--- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc
@@ -4,6 +4,7 @@
#include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h"
+#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -159,7 +160,7 @@ class FetcherClient {
void FinishTestAllowCleanup() {
fetcher_->FinishTest();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TestCompletionCallback callback_;
@@ -217,7 +218,7 @@ TEST(DhcpProxyScriptAdapterFetcher, CancelWhileDhcp) {
FetcherClient client;
client.RunTest();
client.fetcher_->Cancel();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ASSERT_FALSE(client.fetcher_->DidFinish());
ASSERT_TRUE(client.fetcher_->WasCancelled());
EXPECT_EQ(ERR_ABORTED, client.fetcher_->GetResult());
@@ -235,10 +236,10 @@ TEST(DhcpProxyScriptAdapterFetcher, CancelWhileFetcher) {
int max_loops = 4;
while (!client.fetcher_->IsWaitingForFetcher() && max_loops--) {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
client.fetcher_->Cancel();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ASSERT_FALSE(client.fetcher_->DidFinish());
ASSERT_TRUE(client.fetcher_->WasCancelled());
EXPECT_EQ(ERR_ABORTED, client.fetcher_->GetResult());
« no previous file with comments | « net/http/http_stream_factory_impl_request_unittest.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698