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

Unified Diff: content/child/web_url_loader_impl_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR 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 | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl_unittest.cc
diff --git a/content/child/web_url_loader_impl_unittest.cc b/content/child/web_url_loader_impl_unittest.cc
index 5284b1de5376cd2c72e12a327afc707c1db7bba8..9a4c2d76cf6f89a613f810c2d70928c706d8aa55 100644
--- a/content/child/web_url_loader_impl_unittest.cc
+++ b/content/child/web_url_loader_impl_unittest.cc
@@ -15,6 +15,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
@@ -449,7 +450,7 @@ TEST_F(WebURLLoaderImplTest, DeleteBeforeResponseDataURL) {
request.setURL(GURL("data:text/html;charset=utf-8,blah!"));
client()->loader()->loadAsynchronously(request, client());
client()->DeleteLoader();
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(client()->did_receive_response());
}
@@ -460,7 +461,7 @@ TEST_F(WebURLLoaderImplTest, DataURL) {
request.initialize();
request.setURL(GURL("data:text/html;charset=utf-8,blah!"));
client()->loader()->loadAsynchronously(request, client());
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ("blah!", client()->received_data());
EXPECT_TRUE(client()->did_finish());
EXPECT_EQ(net::OK, client()->error().reason);
@@ -473,7 +474,7 @@ TEST_F(WebURLLoaderImplTest, DataURLDeleteOnReceiveResponse) {
request.setURL(GURL("data:text/html;charset=utf-8,blah!"));
client()->set_delete_on_receive_response();
client()->loader()->loadAsynchronously(request, client());
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(client()->did_receive_response());
EXPECT_EQ("", client()->received_data());
EXPECT_FALSE(client()->did_finish());
@@ -485,7 +486,7 @@ TEST_F(WebURLLoaderImplTest, DataURLDeleteOnReceiveData) {
request.setURL(GURL("data:text/html;charset=utf-8,blah!"));
client()->set_delete_on_receive_data();
client()->loader()->loadAsynchronously(request, client());
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(client()->did_receive_response());
EXPECT_EQ("blah!", client()->received_data());
EXPECT_FALSE(client()->did_finish());
@@ -497,7 +498,7 @@ TEST_F(WebURLLoaderImplTest, DataURLDeleteOnFinish) {
request.setURL(GURL("data:text/html;charset=utf-8,blah!"));
client()->set_delete_on_finish();
client()->loader()->loadAsynchronously(request, client());
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(client()->did_receive_response());
EXPECT_EQ("blah!", client()->received_data());
EXPECT_TRUE(client()->did_finish());
@@ -518,22 +519,22 @@ TEST_F(WebURLLoaderImplTest, DataURLDefersLoading) {
client()->loader()->setDefersLoading(false);
client()->loader()->setDefersLoading(true);
client()->loader()->setDefersLoading(true);
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(client()->did_finish());
client()->loader()->setDefersLoading(false);
client()->loader()->setDefersLoading(true);
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(client()->did_finish());
client()->loader()->setDefersLoading(false);
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(client()->did_finish());
client()->loader()->setDefersLoading(true);
client()->loader()->setDefersLoading(false);
client()->loader()->setDefersLoading(false);
- message_loop()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(client()->did_finish());
EXPECT_EQ("blah!", client()->received_data());
« no previous file with comments | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698