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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index 52ad26eb5bb208596d1e401884fb49c7944196b6..4746018464cd75bf750278e422a70610fcfd84d7 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -159,7 +159,7 @@ class TestIPCSender : public IPC::Sender {
EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type());
EXPECT_FALSE(task_queue_.empty());
- MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front());
+ base::MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front());
task_queue_.pop();
sent_messages_.push_back(linked_ptr<IPC::Message>(message));
@@ -200,7 +200,7 @@ class ExtensionWebRequestTest : public testing::Test {
const std::vector<char>& bytes_1,
const std::vector<char>& bytes_2);
- MessageLoopForIO message_loop_;
+ base::MessageLoopForIO message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_;
TestingProfile profile_;
@@ -284,7 +284,7 @@ TEST_F(ExtensionWebRequestTest, BlockingEventPrecedenceRedirect) {
request.identifier(), response));
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!request.is_pending());
EXPECT_EQ(net::URLRequestStatus::SUCCESS, request.status().status());
@@ -334,7 +334,7 @@ TEST_F(ExtensionWebRequestTest, BlockingEventPrecedenceRedirect) {
request2.identifier(), response));
request2.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!request2.is_pending());
EXPECT_EQ(net::URLRequestStatus::SUCCESS, request2.status().status());
@@ -398,7 +398,7 @@ TEST_F(ExtensionWebRequestTest, BlockingEventPrecedenceCancel) {
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!request.is_pending());
EXPECT_EQ(net::URLRequestStatus::FAILED, request.status().status());
@@ -452,14 +452,14 @@ TEST_F(ExtensionWebRequestTest, SimulateChancelWhileBlocked) {
// Extension response for OnErrorOccurred: Terminate the message loop.
ipc_sender_.PushTask(
- base::Bind(&MessageLoop::PostTask,
- base::Unretained(MessageLoop::current()),
- FROM_HERE, MessageLoop::QuitClosure()));
+ base::Bind(&base::MessageLoop::PostTask,
+ base::Unretained(base::MessageLoop::current()),
+ FROM_HERE, base::MessageLoop::QuitClosure()));
request.Start();
// request.Start() will have submitted OnBeforeRequest by the time we cancel.
request.Cancel();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!request.is_pending());
EXPECT_EQ(net::URLRequestStatus::CANCELED, request.status().status());
@@ -623,7 +623,7 @@ TEST_F(ExtensionWebRequestTest, AccessRequestBodyData) {
FireURLRequestWithData(kMethodPost, kMultipart, form_1, form_2);
// We inspect the result in the message list of |ipc_sender_| later.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener(
&profile_, extension_id, kEventName + "/1");
@@ -656,7 +656,7 @@ TEST_F(ExtensionWebRequestTest, AccessRequestBodyData) {
// Now send a PUT request with the same body as above.
FireURLRequestWithData(kMethodPut, NULL /*no header*/, plain_1, plain_2);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Clean-up.
ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener(
@@ -717,7 +717,7 @@ TEST_F(ExtensionWebRequestTest, NoAccessRequestBodyData) {
}
// We inspect the result in the message list of |ipc_sender_| later.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener(
&profile_, extension_id, kEventName + "/1");
@@ -790,7 +790,7 @@ class ExtensionWebRequestHeaderModificationTest
context_->Init();
}
- MessageLoopForIO message_loop_;
+ base::MessageLoopForIO message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_;
TestingProfile profile_;
@@ -888,7 +888,7 @@ TEST_P(ExtensionWebRequestHeaderModificationTest, TestModifications) {
// exists and are therefore not listed in the responses. This makes
// them seem deleted.
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!request.is_pending());
// This cannot succeed as we send the request to a server that does not exist.

Powered by Google App Engine
This is Rietveld 408576698