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

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: Created 7 years, 8 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 fc78860babf1a768423788a30895bf2f3efd9536..e83d7a22a210dd80944a185e48671ea73ade2835 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
@@ -157,7 +157,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));
@@ -198,7 +198,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_;
@@ -276,7 +276,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());
@@ -326,7 +326,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());
@@ -390,7 +390,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());
@@ -444,15 +444,15 @@ 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());
@@ -616,7 +616,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");
@@ -649,7 +649,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(
@@ -710,7 +710,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");
@@ -783,7 +783,7 @@ class ExtensionWebRequestHeaderModificationTest :
context_->Init();
}
- MessageLoopForIO message_loop_;
+ base::MessageLoopForIO message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_;
TestingProfile profile_;
@@ -881,7 +881,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