summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 20:51:34 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 20:51:34 +0000
commit2da659e6279cf515940eb8a091e09e27281a97d6 (patch)
treea34e2eeea8194a16603e24149ae634cb54ddab62 /net/url_request
parent954f56f3aceed29573f841648168b91c1fd43074 (diff)
downloadchromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.zip
chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.gz
chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.bz2
net: Use base::MessageLoop.
BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14021017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/test_url_fetcher_factory.cc2
-rw-r--r--net/url_request/url_fetcher_impl_unittest.cc99
-rw-r--r--net/url_request/url_request.cc16
-rw-r--r--net/url_request/url_request_about_job.cc2
-rw-r--r--net/url_request/url_request_context_builder.cc6
-rw-r--r--net/url_request/url_request_context_builder_unittest.cc4
-rw-r--r--net/url_request/url_request_error_job.cc2
-rw-r--r--net/url_request/url_request_file_dir_job.cc2
-rw-r--r--net/url_request/url_request_ftp_job.cc2
-rw-r--r--net/url_request/url_request_ftp_job_unittest.cc2
-rw-r--r--net/url_request/url_request_http_job.cc8
-rw-r--r--net/url_request/url_request_job.cc2
-rw-r--r--net/url_request/url_request_job_factory_impl_unittest.cc9
-rw-r--r--net/url_request/url_request_job_unittest.cc4
-rw-r--r--net/url_request/url_request_redirect_job.cc2
-rw-r--r--net/url_request/url_request_simple_job.cc5
-rw-r--r--net/url_request/url_request_test_job.cc4
-rw-r--r--net/url_request/url_request_test_util.cc6
-rw-r--r--net/url_request/url_request_unittest.cc328
19 files changed, 256 insertions, 249 deletions
diff --git a/net/url_request/test_url_fetcher_factory.cc b/net/url_request/test_url_fetcher_factory.cc
index 51ca21c..2db9fe8 100644
--- a/net/url_request/test_url_fetcher_factory.cc
+++ b/net/url_request/test_url_fetcher_factory.cc
@@ -296,7 +296,7 @@ FakeURLFetcher::FakeURLFetcher(const GURL& url,
FakeURLFetcher::~FakeURLFetcher() {}
void FakeURLFetcher::Start() {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FakeURLFetcher::RunDelegate, weak_factory_.GetWeakPtr()));
}
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index f45c6e7..de4221f 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -184,7 +184,8 @@ void URLFetcherTest::CleanupAfterFetchComplete() {
// because the destructor won't necessarily run on the
// same thread that CreateFetcher() did.
- io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ io_message_loop_proxy()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
// If the current message loop is not the IO loop, it will be shut down when
// the main loop returns and this thread subsequently goes out of scope.
}
@@ -220,7 +221,8 @@ void URLFetcherMockDnsTest::CreateFetcher(const GURL& url) {
}
void URLFetcherMockDnsTest::OnURLFetchComplete(const URLFetcher* source) {
- io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ io_message_loop_proxy()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
ASSERT_EQ(fetcher_, source);
EXPECT_EQ(test_url_, source->GetOriginalURL());
completed_fetcher_.reset(fetcher_);
@@ -422,7 +424,8 @@ class CancelTestURLRequestContext : public ThrottlingTestURLRequestContext {
virtual ~CancelTestURLRequestContext() {
// The d'tor should execute in the IO thread. Post the quit task to the
// current thread.
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
};
@@ -899,7 +902,7 @@ TEST_F(URLFetcherTest, SameThreadsTest) {
// thread.
CreateFetcher(test_server.GetURL("defaultresponse"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherTest, DifferentThreadsTest) {
@@ -921,7 +924,7 @@ TEST_F(URLFetcherTest, DifferentThreadsTest) {
base::Unretained(this),
test_server.GetURL("defaultresponse")));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void CancelAllOnIO() {
@@ -940,10 +943,8 @@ TEST_F(URLFetcherTest, CancelAll) {
CreateFetcher(test_server.GetURL("defaultresponse"));
io_message_loop_proxy()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&CancelAllOnIO),
- MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ FROM_HERE, base::Bind(&CancelAllOnIO), base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, GetNumFetcherCores());
delete fetcher_;
}
@@ -956,7 +957,7 @@ TEST_F(URLFetcherMockDnsTest, DontRetryOnNetworkChangedByDefault) {
CreateFetcher(test_url_);
fetcher_->Start();
EXPECT_EQ(0, GetNumFetcherCores());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// The fetcher is now running, but is pending the host resolve.
EXPECT_EQ(1, GetNumFetcherCores());
@@ -965,7 +966,7 @@ TEST_F(URLFetcherMockDnsTest, DontRetryOnNetworkChangedByDefault) {
// A network change notification aborts the connect job.
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, GetNumFetcherCores());
EXPECT_FALSE(resolver_.has_pending_requests());
ASSERT_TRUE(completed_fetcher_);
@@ -983,7 +984,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndFail) {
fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
fetcher_->Start();
EXPECT_EQ(0, GetNumFetcherCores());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// The fetcher is now running, but is pending the host resolve.
EXPECT_EQ(1, GetNumFetcherCores());
@@ -994,7 +995,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndFail) {
for (int i = 0; i < 3; ++i) {
// A network change notification aborts the connect job.
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// But the fetcher retries automatically.
EXPECT_EQ(1, GetNumFetcherCores());
@@ -1005,7 +1006,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndFail) {
// A 4th failure doesn't trigger another retry, and propagates the error
// to the owner of the fetcher.
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, GetNumFetcherCores());
EXPECT_FALSE(resolver_.has_pending_requests());
ASSERT_TRUE(completed_fetcher_);
@@ -1023,7 +1024,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndSucceed) {
fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
fetcher_->Start();
EXPECT_EQ(0, GetNumFetcherCores());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// The fetcher is now running, but is pending the host resolve.
EXPECT_EQ(1, GetNumFetcherCores());
@@ -1034,7 +1035,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndSucceed) {
for (int i = 0; i < 3; ++i) {
// A network change notification aborts the connect job.
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// But the fetcher retries automatically.
EXPECT_EQ(1, GetNumFetcherCores());
@@ -1044,7 +1045,7 @@ TEST_F(URLFetcherMockDnsTest, RetryOnNetworkChangedAndSucceed) {
// Now let it succeed by resolving the pending request.
resolver_.ResolveAllPending();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// URLFetcherMockDnsTest::OnURLFetchComplete() will quit the loop.
EXPECT_EQ(0, GetNumFetcherCores());
@@ -1063,7 +1064,7 @@ TEST_F(URLFetcherPostTest, Basic) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("echo"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherPostFileTest, Basic) {
@@ -1073,7 +1074,7 @@ TEST_F(URLFetcherPostFileTest, Basic) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("echo"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherPostFileTest, Range) {
@@ -1085,7 +1086,7 @@ TEST_F(URLFetcherPostFileTest, Range) {
SetUploadRange(30, 100);
CreateFetcher(test_server.GetURL("echo"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherEmptyPostTest, Basic) {
@@ -1095,7 +1096,7 @@ TEST_F(URLFetcherEmptyPostTest, Basic) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("echo"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherUploadProgressTest, Basic) {
@@ -1105,7 +1106,7 @@ TEST_F(URLFetcherUploadProgressTest, Basic) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("echo"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherDownloadProgressTest, Basic) {
@@ -1126,7 +1127,7 @@ TEST_F(URLFetcherDownloadProgressTest, Basic) {
CreateFetcher(test_server.GetURL(
std::string(kTestServerFilePrefix) + kFileToFetch));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherDownloadProgressCancelTest, CancelWhileProgressReport) {
@@ -1141,7 +1142,7 @@ TEST_F(URLFetcherDownloadProgressCancelTest, CancelWhileProgressReport) {
CreateFetcher(test_server.GetURL(
std::string(kTestServerFilePrefix) + kFileToFetch));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherHeadersTest, Headers) {
@@ -1152,7 +1153,7 @@ TEST_F(URLFetcherHeadersTest, Headers) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("files/with-headers.html"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// The actual tests are in the URLFetcherHeadersTest fixture.
}
@@ -1166,7 +1167,7 @@ TEST_F(URLFetcherSocketAddressTest, SocketAddress) {
// Reusing "with-headers.html" but doesn't really matter.
CreateFetcher(test_server.GetURL("files/with-headers.html"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// The actual tests are in the URLFetcherSocketAddressTest fixture.
}
@@ -1178,7 +1179,7 @@ TEST_F(URLFetcherStopOnRedirectTest, StopOnRedirect) {
CreateFetcher(
test_server.GetURL(std::string("server-redirect?") + kRedirectTarget));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(callback_called_);
}
@@ -1205,7 +1206,7 @@ TEST_F(URLFetcherProtectTest, Overload) {
CreateFetcher(url);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherProtectTest, ServerUnavailable) {
@@ -1233,7 +1234,7 @@ TEST_F(URLFetcherProtectTest, ServerUnavailable) {
CreateFetcher(url);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherProtectTestPassedThrough, ServerUnavailablePropagateResponse) {
@@ -1263,7 +1264,7 @@ TEST_F(URLFetcherProtectTestPassedThrough, ServerUnavailablePropagateResponse) {
CreateFetcher(url);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherBadHTTPSTest, BadHTTPSTest) {
@@ -1275,7 +1276,7 @@ TEST_F(URLFetcherBadHTTPSTest, BadHTTPSTest) {
ASSERT_TRUE(test_server.Start());
CreateFetcher(test_server.GetURL("defaultresponse"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherCancelTest, ReleasesContext) {
@@ -1298,7 +1299,7 @@ TEST_F(URLFetcherCancelTest, ReleasesContext) {
base::Bind(&URLFetcherCancelTest::CreateFetcher,
base::Unretained(this), url));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherCancelTest, CancelWhileDelayedStartTaskPending) {
@@ -1335,7 +1336,7 @@ TEST_F(URLFetcherCancelTest, CancelWhileDelayedStartTaskPending) {
FROM_HERE,
base::Bind(&URLFetcherTest::CreateFetcher, base::Unretained(this), url));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherMultipleAttemptTest, SameData) {
@@ -1349,7 +1350,7 @@ TEST_F(URLFetcherMultipleAttemptTest, SameData) {
// thread.
CreateFetcher(test_server.GetURL("defaultresponse"));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
TEST_F(URLFetcherFileTest, SmallGet) {
@@ -1368,7 +1369,7 @@ TEST_F(URLFetcherFileTest, SmallGet) {
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
temp_dir.path().AppendASCII(kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
ASSERT_FALSE(file_util::PathExists(file_path_))
<< file_path_.value() << " not removed.";
@@ -1391,7 +1392,7 @@ TEST_F(URLFetcherFileTest, LargeGet) {
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
temp_dir.path().AppendASCII(kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
}
TEST_F(URLFetcherFileTest, CanTakeOwnershipOfFile) {
@@ -1410,11 +1411,11 @@ TEST_F(URLFetcherFileTest, CanTakeOwnershipOfFile) {
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
temp_dir.path().AppendASCII(kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
- MessageLoop::current()->RunUntilIdle();
- ASSERT_FALSE(file_util::PathExists(file_path_))
- << file_path_.value() << " not removed.";
+ base::MessageLoop::current()->RunUntilIdle();
+ ASSERT_FALSE(file_util::PathExists(file_path_)) << file_path_.value()
+ << " not removed.";
}
@@ -1442,7 +1443,7 @@ TEST_F(URLFetcherFileTest, OverwriteExistingFile) {
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
file_path_);
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
}
TEST_F(URLFetcherFileTest, TryToOverwriteDirectory) {
@@ -1467,9 +1468,9 @@ TEST_F(URLFetcherFileTest, TryToOverwriteDirectory) {
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
file_path_);
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_F(URLFetcherFileTest, SmallGetToTempFile) {
@@ -1484,7 +1485,7 @@ TEST_F(URLFetcherFileTest, SmallGetToTempFile) {
CreateFetcherForTempFile(
test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
ASSERT_FALSE(file_util::PathExists(file_path_))
<< file_path_.value() << " not removed.";
@@ -1503,7 +1504,7 @@ TEST_F(URLFetcherFileTest, LargeGetToTempFile) {
CreateFetcherForTempFile(test_server.GetURL(
std::string(kTestServerFilePrefix) + kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
}
TEST_F(URLFetcherFileTest, CanTakeOwnershipOfTempFile) {
@@ -1518,11 +1519,11 @@ TEST_F(URLFetcherFileTest, CanTakeOwnershipOfTempFile) {
CreateFetcherForTempFile(test_server.GetURL(
std::string(kTestServerFilePrefix) + kFileToFetch));
- MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
+ base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
- MessageLoop::current()->RunUntilIdle();
- ASSERT_FALSE(file_util::PathExists(file_path_))
- << file_path_.value() << " not removed.";
+ base::MessageLoop::current()->RunUntilIdle();
+ ASSERT_FALSE(file_util::PathExists(file_path_)) << file_path_.value()
+ << " not removed.";
}
} // namespace
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 3487c71..853f9ee 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -225,10 +225,12 @@ URLRequest::URLRequest(const GURL& url,
SIMPLE_STATS_COUNTER("URLRequestCount");
// Sanity check out environment.
- DCHECK(MessageLoop::current()) << "The current MessageLoop must exist";
+ DCHECK(base::MessageLoop::current())
+ << "The current base::MessageLoop must exist";
- DCHECK(MessageLoop::current()->IsType(MessageLoop::TYPE_IO)) << ""
- "The current MessageLoop must be TYPE_IO";
+ DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_IO))
+ << ""
+ "The current base::MessageLoop must be TYPE_IO";
CHECK(context);
context->url_requests()->insert(this);
@@ -263,10 +265,12 @@ URLRequest::URLRequest(const GURL& url,
SIMPLE_STATS_COUNTER("URLRequestCount");
// Sanity check out environment.
- DCHECK(MessageLoop::current()) << "The current MessageLoop must exist";
+ DCHECK(base::MessageLoop::current())
+ << "The current base::MessageLoop must exist";
- DCHECK(MessageLoop::current()->IsType(MessageLoop::TYPE_IO)) << ""
- "The current MessageLoop must be TYPE_IO";
+ DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_IO))
+ << ""
+ "The current base::MessageLoop must be TYPE_IO";
CHECK(context);
context->url_requests()->insert(this);
diff --git a/net/url_request/url_request_about_job.cc b/net/url_request/url_request_about_job.cc
index 7c7251d..517c702 100644
--- a/net/url_request/url_request_about_job.cc
+++ b/net/url_request/url_request_about_job.cc
@@ -23,7 +23,7 @@ URLRequestAboutJob::URLRequestAboutJob(URLRequest* request,
void URLRequestAboutJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestAboutJob::StartAsync, weak_factory_.GetWeakPtr()));
}
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 4dda0e9..841d180 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -138,7 +138,7 @@ class BasicURLRequestContext : public URLRequestContext {
void StartCacheThread() {
cache_thread_.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0));
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
}
scoped_refptr<base::MessageLoopProxy> cache_message_loop_proxy() {
@@ -148,10 +148,10 @@ class BasicURLRequestContext : public URLRequestContext {
void StartFileThread() {
file_thread_.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_DEFAULT, 0));
+ base::Thread::Options(base::MessageLoop::TYPE_DEFAULT, 0));
}
- MessageLoop* file_message_loop() {
+ base::MessageLoop* file_message_loop() {
DCHECK(file_thread_.IsRunning());
return file_thread_.message_loop();
}
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index b7cbcbe..f747b4d 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -60,7 +60,7 @@ TEST_F(URLRequestContextBuilderTest, DefaultSettings) {
request.set_method("GET");
request.SetExtraRequestHeaderByName("Foo", "Bar", false);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("Bar", delegate.data_received());
}
@@ -74,7 +74,7 @@ TEST_F(URLRequestContextBuilderTest, UserAgent) {
test_server_.GetURL("echoheader?User-Agent"), &delegate, context.get());
request.set_method("GET");
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("Bar", delegate.data_received());
}
diff --git a/net/url_request/url_request_error_job.cc b/net/url_request/url_request_error_job.cc
index f8c2661..f6bf3f2 100644
--- a/net/url_request/url_request_error_job.cc
+++ b/net/url_request/url_request_error_job.cc
@@ -21,7 +21,7 @@ URLRequestErrorJob::URLRequestErrorJob(
URLRequestErrorJob::~URLRequestErrorJob() {}
void URLRequestErrorJob::Start() {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestErrorJob::StartAsync, weak_factory_.GetWeakPtr()));
}
diff --git a/net/url_request/url_request_file_dir_job.cc b/net/url_request/url_request_file_dir_job.cc
index 421c62a..ff1e780 100644
--- a/net/url_request/url_request_file_dir_job.cc
+++ b/net/url_request/url_request_file_dir_job.cc
@@ -45,7 +45,7 @@ void URLRequestFileDirJob::StartAsync() {
void URLRequestFileDirJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestFileDirJob::StartAsync,
weak_factory_.GetWeakPtr()));
diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
index ac35f7e..4f677ef 100644
--- a/net/url_request/url_request_ftp_job.cc
+++ b/net/url_request/url_request_ftp_job.cc
@@ -237,7 +237,7 @@ void URLRequestFtpJob::OnStartCompleted(int result) {
}
void URLRequestFtpJob::OnStartCompletedAsync(int result) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestFtpJob::OnStartCompleted,
weak_factory_.GetWeakPtr(), result));
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index 0fab7d5..3b4a790 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -577,7 +577,7 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequestDoNotFollowRedirects) {
url_request.Start();
EXPECT_TRUE(url_request.is_pending());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(url_request.is_pending());
EXPECT_EQ(0, request_delegate.response_started_count());
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 7b38fa1..710bd0d 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -505,7 +505,7 @@ void URLRequestHttpJob::StartTransactionInternal() {
// The transaction started synchronously, but we need to notify the
// URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestHttpJob::OnStartCompleted,
weak_factory_.GetWeakPtr(), rv));
@@ -1156,7 +1156,7 @@ void URLRequestHttpJob::CancelAuth() {
//
// We have to do this via InvokeLater to avoid "recursing" the consumer.
//
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestHttpJob::OnStartCompleted,
weak_factory_.GetWeakPtr(), OK));
@@ -1181,7 +1181,7 @@ void URLRequestHttpJob::ContinueWithCertificate(
// The transaction started synchronously, but we need to notify the
// URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestHttpJob::OnStartCompleted,
weak_factory_.GetWeakPtr(), rv));
@@ -1207,7 +1207,7 @@ void URLRequestHttpJob::ContinueDespiteLastError() {
// The transaction started synchronously, but we need to notify the
// URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestHttpJob::OnStartCompleted,
weak_factory_.GetWeakPtr(), rv));
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 18133af..04ba8ae 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -444,7 +444,7 @@ void URLRequestJob::NotifyDone(const URLRequestStatus &status) {
// Complete this notification later. This prevents us from re-entering the
// delegate if we're done because of a synchronous call.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestJob::CompleteNotifyDone,
weak_factory_.GetWeakPtr()));
diff --git a/net/url_request/url_request_job_factory_impl_unittest.cc b/net/url_request/url_request_job_factory_impl_unittest.cc
index e17fdcd..078e16a 100644
--- a/net/url_request/url_request_job_factory_impl_unittest.cc
+++ b/net/url_request/url_request_job_factory_impl_unittest.cc
@@ -27,10 +27,9 @@ class MockURLRequestJob : public URLRequestJob {
virtual void Start() OVERRIDE {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&MockURLRequestJob::StartAsync,
- weak_factory_.GetWeakPtr()));
+ base::Bind(&MockURLRequestJob::StartAsync, weak_factory_.GetWeakPtr()));
}
protected:
@@ -63,7 +62,7 @@ TEST(URLRequestJobFactoryTest, NoProtocolHandler) {
TestURLRequest request(GURL("foo://bar"), &delegate, &request_context, NULL);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, request.status().status());
EXPECT_EQ(ERR_UNKNOWN_URL_SCHEME, request.status().error());
}
@@ -77,7 +76,7 @@ TEST(URLRequestJobFactoryTest, BasicProtocolHandler) {
TestURLRequest request(GURL("foo://bar"), &delegate, &request_context, NULL);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, request.status().status());
EXPECT_EQ(OK, request.status().error());
}
diff --git a/net/url_request/url_request_job_unittest.cc b/net/url_request/url_request_job_unittest.cc
index a925ee1..354915f 100644
--- a/net/url_request/url_request_job_unittest.cc
+++ b/net/url_request/url_request_job_unittest.cc
@@ -51,7 +51,7 @@ TEST(URLRequestJob, TransactionNotifiedWhenDone) {
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(network_layer.done_reading_called());
@@ -72,7 +72,7 @@ TEST(URLRequestJob, SyncTransactionNotifiedWhenDone) {
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(network_layer.done_reading_called());
diff --git a/net/url_request/url_request_redirect_job.cc b/net/url_request/url_request_redirect_job.cc
index 4b4c8fe..a4b0dfb 100644
--- a/net/url_request/url_request_redirect_job.cc
+++ b/net/url_request/url_request_redirect_job.cc
@@ -20,7 +20,7 @@ URLRequestRedirectJob::URLRequestRedirectJob(URLRequest* request,
weak_factory_(this) {}
void URLRequestRedirectJob::Start() {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&URLRequestRedirectJob::StartAsync,
weak_factory_.GetWeakPtr()));
diff --git a/net/url_request/url_request_simple_job.cc b/net/url_request/url_request_simple_job.cc
index 6ac1c21..6b0f99c 100644
--- a/net/url_request/url_request_simple_job.cc
+++ b/net/url_request/url_request_simple_job.cc
@@ -22,10 +22,9 @@ URLRequestSimpleJob::URLRequestSimpleJob(
void URLRequestSimpleJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&URLRequestSimpleJob::StartAsync,
- weak_factory_.GetWeakPtr()));
+ base::Bind(&URLRequestSimpleJob::StartAsync, weak_factory_.GetWeakPtr()));
}
bool URLRequestSimpleJob::GetMimeType(std::string* mime_type) const {
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index 2f2882a..c456ae5 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -147,7 +147,7 @@ void URLRequestTestJob::SetPriority(RequestPriority priority) {
void URLRequestTestJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&URLRequestTestJob::StartAsync,
weak_factory_.GetWeakPtr()));
}
@@ -296,7 +296,7 @@ bool URLRequestTestJob::NextReadAsync() {
void URLRequestTestJob::AdvanceJob() {
if (auto_advance_) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&URLRequestTestJob::ProcessNextOperation,
weak_factory_.GetWeakPtr()));
return;
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index b1dab4b..8fd603d 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -186,7 +186,8 @@ void TestDelegate::OnReceivedRedirect(URLRequest* request,
received_redirect_count_++;
if (quit_on_redirect_) {
*defer_redirect = true;
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
} else if (cancel_in_rr_) {
request->Cancel();
}
@@ -278,7 +279,8 @@ void TestDelegate::OnReadCompleted(URLRequest* request, int bytes_read) {
void TestDelegate::OnResponseCompleted(URLRequest* request) {
if (quit_on_complete_)
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
TestNetworkDelegate::TestNetworkDelegate()
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index ca08f25..4ad170a 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -502,7 +502,7 @@ NetworkDelegate::AuthRequiredResponse BlockingNetworkDelegate::OnAuthRequired(
return auth_retval_;
case AUTO_CALLBACK:
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BlockingNetworkDelegate::RunAuthCallback,
weak_factory_.GetWeakPtr(), auth_retval_, callback));
@@ -511,7 +511,8 @@ NetworkDelegate::AuthRequiredResponse BlockingNetworkDelegate::OnAuthRequired(
case USER_CALLBACK:
auth_callback_ = callback;
stage_blocked_for_callback_ = ON_AUTH_REQUIRED;
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
return AUTH_REQUIRED_RESPONSE_IO_PENDING;
}
NOTREACHED();
@@ -541,7 +542,7 @@ int BlockingNetworkDelegate::MaybeBlockStage(
return retval_;
case AUTO_CALLBACK:
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BlockingNetworkDelegate::RunCallback,
weak_factory_.GetWeakPtr(), retval_, callback));
@@ -550,7 +551,8 @@ int BlockingNetworkDelegate::MaybeBlockStage(
case USER_CALLBACK:
callback_ = callback;
stage_blocked_for_callback_ = stage;
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
return ERR_IO_PENDING;
}
NOTREACHED();
@@ -608,7 +610,7 @@ TEST_F(URLRequestTest, AboutBlankTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!r.is_pending());
EXPECT_FALSE(d.received_data_before_response());
@@ -648,7 +650,7 @@ TEST_F(URLRequestTest, DataURLImageTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!r.is_pending());
EXPECT_FALSE(d.received_data_before_response());
@@ -670,7 +672,7 @@ TEST_F(URLRequestTest, FileTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = -1;
EXPECT_TRUE(file_util::GetFileSize(app_path, &file_size));
@@ -699,7 +701,7 @@ TEST_F(URLRequestTest, FileTestCancel) {
}
// Async cancelation should be safe even when URLRequest has been already
// destroyed.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
@@ -734,7 +736,7 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!r.is_pending());
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -777,7 +779,7 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(!r.is_pending());
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -813,7 +815,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.request_failed());
}
@@ -828,7 +830,7 @@ TEST_F(URLRequestTest, InvalidUrlTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.request_failed());
}
}
@@ -866,7 +868,7 @@ TEST_F(URLRequestTest, ResolveShortcutTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
WIN32_FILE_ATTRIBUTE_DATA data;
GetFileAttributesEx(app_path.value().c_str(),
@@ -910,7 +912,7 @@ TEST_F(URLRequestTest, FileDirCancelTest) {
d.set_cancel_in_received_data_pending(true);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
// Take out mock resource provider.
@@ -931,7 +933,7 @@ TEST_F(URLRequestTest, FileDirRedirectNoCrash) {
TestDelegate d;
URLRequest req(FilePathToFileURL(path), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(1, d.received_redirect_count());
ASSERT_LT(0, d.bytes_received());
@@ -945,7 +947,7 @@ TEST_F(URLRequestTest, FileDirRedirectSingleSlash) {
TestDelegate d;
URLRequest req(GURL("file:///"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(1, d.received_redirect_count());
ASSERT_FALSE(req.status().is_success());
@@ -1173,7 +1175,7 @@ TEST_F(URLRequestTest, Intercept) {
req.SetUserData(&user_data2, user_data2);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Make sure we can retrieve our specific user data
EXPECT_EQ(user_data0, req.GetUserData(NULL));
@@ -1208,7 +1210,7 @@ TEST_F(URLRequestTest, InterceptRedirect) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_intercept_main_);
@@ -1241,7 +1243,7 @@ TEST_F(URLRequestTest, InterceptServerError) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_intercept_main_);
@@ -1270,7 +1272,7 @@ TEST_F(URLRequestTest, InterceptNetworkError) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_simulate_error_main_);
@@ -1299,7 +1301,7 @@ TEST_F(URLRequestTest, InterceptRestartRequired) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_restart_main_);
@@ -1330,7 +1332,7 @@ TEST_F(URLRequestTest, InterceptRespectsCancelMain) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_cancel_main_);
@@ -1361,7 +1363,7 @@ TEST_F(URLRequestTest, InterceptRespectsCancelRedirect) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_intercept_main_);
@@ -1386,7 +1388,7 @@ TEST_F(URLRequestTest, InterceptRespectsCancelFinal) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_simulate_error_main_);
@@ -1412,7 +1414,7 @@ TEST_F(URLRequestTest, InterceptRespectsCancelInRestart) {
URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_);
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check the interceptor got called as expected
EXPECT_TRUE(interceptor.did_cancel_then_restart_main_);
@@ -1431,7 +1433,7 @@ LoadTimingInfo RunLoadTimingTest(const LoadTimingInfo& job_load_timing,
TestDelegate d;
URLRequest req(GURL("http://test_intercept/foo"), &d, context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
LoadTimingInfo resulting_load_timing;
req.GetLoadTimingInfo(&resulting_load_timing);
@@ -1708,7 +1710,7 @@ TEST_F(URLRequestTest, NetworkDelegateProxyError) {
req.set_method("GET");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Check we see a failed request.
EXPECT_FALSE(req.status().is_success());
@@ -1726,7 +1728,7 @@ TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) {
TestDelegate d;
URLRequest req(GURL("data:,"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("", d.data_received());
EXPECT_EQ(1, default_network_delegate_.completed_requests());
}
@@ -1820,7 +1822,7 @@ TEST_F(URLRequestTest, DelayedCookieCallback) {
URLRequest req(
test_server.GetURL("set-cookie?CookieToNotSend=1"), &d, &context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
EXPECT_EQ(1, network_delegate.set_cookie_count());
@@ -1833,7 +1835,7 @@ TEST_F(URLRequestTest, DelayedCookieCallback) {
TestDelegate d;
URLRequest req(test_server.GetURL("echoheader?Cookie"), &d, &context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSend=1")
!= std::string::npos);
@@ -1855,7 +1857,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
}
@@ -1868,7 +1870,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSend=1")
!= std::string::npos);
@@ -1885,7 +1887,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.set_load_flags(LOAD_DO_NOT_SEND_COOKIES);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("Cookie: CookieToNotSend=1")
== std::string::npos);
@@ -1909,7 +1911,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -1928,7 +1930,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
req.set_load_flags(LOAD_DO_NOT_SAVE_COOKIES);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// LOAD_DO_NOT_SAVE_COOKIES does not trigger OnSetCookie.
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
@@ -1944,7 +1946,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSave=1")
== std::string::npos);
@@ -1970,7 +1972,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -1984,7 +1986,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSend=1")
!= std::string::npos);
@@ -2002,7 +2004,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("Cookie: CookieToNotSend=1")
== std::string::npos);
@@ -2025,7 +2027,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -2043,7 +2045,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(2, network_delegate.blocked_set_cookie_count());
@@ -2057,7 +2059,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSave=1")
== std::string::npos);
@@ -2080,7 +2082,7 @@ TEST_F(URLRequestTest, DoNotSaveEmptyCookies) {
TestDelegate d;
URLRequest req(test_server.GetURL("set-cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -2101,7 +2103,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -2115,7 +2117,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSend=1")
!= std::string::npos);
@@ -2133,7 +2135,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("Cookie: CookieToNotSend=1")
== std::string::npos);
@@ -2156,7 +2158,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
@@ -2174,7 +2176,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
EXPECT_EQ(2, network_delegate.blocked_set_cookie_count());
@@ -2188,7 +2190,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("CookieToNotSave=1")
== std::string::npos);
@@ -2257,7 +2259,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
// Verify that the cookie is not set.
{
@@ -2267,7 +2269,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("StillGood=1") == std::string::npos);
}
@@ -2281,7 +2283,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
// Verify that the cookie is set.
{
@@ -2291,7 +2293,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
URLRequest req(
test_server.GetURL("echoheader?Cookie"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("StillGood=1") != std::string::npos);
}
@@ -2317,7 +2319,7 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) {
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("http://foo.com/", d.data_received());
}
@@ -2335,7 +2337,7 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) {
req.set_load_flags(LOAD_VALIDATE_CACHE);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("None", d.data_received());
}
@@ -2372,7 +2374,7 @@ class URLRequestTestHTTP : public URLRequestTest {
req.SetExtraRequestHeaders(headers);
}
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(redirect_method, req.method());
EXPECT_EQ(URLRequestStatus::SUCCESS, req.status().status());
EXPECT_EQ(OK, req.status().error());
@@ -2415,7 +2417,7 @@ class URLRequestTestHTTP : public URLRequestTest {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(1, d.response_started_count())
<< "request failed: " << r.status().status()
@@ -2461,7 +2463,7 @@ class URLRequestTestHTTP : public URLRequestTest {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
bool is_success = r.status().is_success();
@@ -2500,7 +2502,7 @@ TEST_F(URLRequestTestHTTP, ProxyTunnelRedirectTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, r.status().error());
@@ -2526,7 +2528,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateTunnelConnectionFailed) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, r.status().error());
@@ -2567,12 +2569,12 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateBlockAsynchronously) {
r.Start();
for (size_t i = 0; i < blocking_stages_length; ++i) {
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(blocking_stages[i],
network_delegate.stage_blocked_for_callback());
network_delegate.DoCallback(OK);
}
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(200, r.GetResponseCode());
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(1, network_delegate.created_requests());
@@ -2599,7 +2601,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelRequest) {
URLRequest r(test_server_.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
EXPECT_EQ(ERR_EMPTY_RESPONSE, r.status().error());
@@ -2629,7 +2631,7 @@ void NetworkDelegateCancelRequest(BlockingNetworkDelegate::BlockMode block_mode,
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
EXPECT_EQ(ERR_BLOCKED_BY_CLIENT, r.status().error());
@@ -2706,7 +2708,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequest) {
URLRequest r(original_url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2739,7 +2741,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestSynchronously) {
URLRequest r(original_url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2779,7 +2781,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestPost) {
base::UintToString(arraysize(kData) - 1));
r.SetExtraRequestHeaders(headers);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2815,7 +2817,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncNoAction) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2849,7 +2851,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncSetAuth) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2881,7 +2883,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncCancel) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(OK, r.status().error());
@@ -2915,7 +2917,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncNoAction) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2950,7 +2952,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncSetAuth) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(0, r.status().error());
@@ -2983,7 +2985,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncCancel) {
GURL url(test_server_.GetURL("auth-basic"));
URLRequest r(url, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
EXPECT_EQ(OK, r.status().error());
@@ -3014,7 +3016,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting1) {
URLRequest r(test_server_.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(BlockingNetworkDelegate::ON_BEFORE_URL_REQUEST,
network_delegate.stage_blocked_for_callback());
EXPECT_EQ(0, network_delegate.completed_requests());
@@ -3050,7 +3052,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting2) {
URLRequest r(test_server_.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(BlockingNetworkDelegate::ON_BEFORE_SEND_HEADERS,
network_delegate.stage_blocked_for_callback());
EXPECT_EQ(0, network_delegate.completed_requests());
@@ -3085,7 +3087,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting3) {
URLRequest r(test_server_.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(BlockingNetworkDelegate::ON_HEADERS_RECEIVED,
network_delegate.stage_blocked_for_callback());
EXPECT_EQ(0, network_delegate.completed_requests());
@@ -3120,7 +3122,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting4) {
URLRequest r(test_server_.GetURL("auth-basic"), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(BlockingNetworkDelegate::ON_AUTH_REQUIRED,
network_delegate.stage_blocked_for_callback());
EXPECT_EQ(0, network_delegate.completed_requests());
@@ -3154,7 +3156,7 @@ TEST_F(URLRequestTestHTTP, UnexpectedServerAuthTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, r.status().error());
@@ -3171,7 +3173,7 @@ TEST_F(URLRequestTestHTTP, GetTest_NoCache) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -3237,7 +3239,7 @@ TEST_F(URLRequestTestHTTP, GetTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -3259,7 +3261,7 @@ TEST_F(URLRequestTestHTTP, GetTestLoadTiming) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
LoadTimingInfo load_timing_info;
r.GetLoadTimingInfo(&load_timing_info);
@@ -3308,7 +3310,7 @@ TEST_F(URLRequestTestHTTP, GetZippedTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -3344,7 +3346,7 @@ TEST_F(URLRequestTestHTTP, HTTPSToHTTPRedirectNoRefererTest) {
"server-redirect?" + http_destination.spec()), &d, &default_context_);
req.SetReferrer("https://www.referrer.com/");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(1, d.received_redirect_count());
@@ -3361,7 +3363,7 @@ TEST_F(URLRequestTestHTTP, RedirectLoadTiming) {
TestDelegate d;
URLRequest req(original_url, &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(1, d.received_redirect_count());
@@ -3401,7 +3403,7 @@ TEST_F(URLRequestTestHTTP, MultipleRedirectTest) {
TestDelegate d;
URLRequest req(original_url, &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(2, d.received_redirect_count());
@@ -3439,7 +3441,7 @@ TEST_F(URLRequestTestHTTP, RedirectWithAdditionalHeadersTest) {
RedirectWithAdditionalHeadersDelegate d;
URLRequest req(original_url, &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
std::string value;
const HttpRequestHeaders& headers = req.extra_request_headers();
@@ -3476,7 +3478,7 @@ TEST_F(URLRequestTestHTTP, RedirectWithHeaderRemovalTest) {
URLRequest req(original_url, &d, &default_context_);
req.SetExtraRequestHeaderByName(kExtraHeaderToRemove, "dummy", false);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
std::string value;
const HttpRequestHeaders& headers = req.extra_request_headers();
@@ -3496,7 +3498,7 @@ TEST_F(URLRequestTestHTTP, CancelTest) {
r.Cancel();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// We expect to receive OnResponseStarted even though the request has been
// cancelled.
@@ -3518,7 +3520,7 @@ TEST_F(URLRequestTestHTTP, CancelTest2) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(0, d.bytes_received());
@@ -3539,7 +3541,7 @@ TEST_F(URLRequestTestHTTP, CancelTest3) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
// There is no guarantee about how much data was received
@@ -3584,7 +3586,7 @@ TEST_F(URLRequestTestHTTP, CancelTest5) {
TestDelegate d;
URLRequest r(test_server_.GetURL("cachetime"), &d, &default_context_);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status());
}
@@ -3594,7 +3596,7 @@ TEST_F(URLRequestTestHTTP, CancelTest5) {
URLRequest r(test_server_.GetURL("cachetime"), &d, &default_context_);
r.Start();
r.Cancel();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::CANCELED, r.status().status());
EXPECT_EQ(1, d.response_started_count());
@@ -3624,7 +3626,7 @@ TEST_F(URLRequestTestHTTP, PostEmptyTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ(1, d.response_started_count())
<< "request failed: " << r.status().status()
@@ -3669,7 +3671,7 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 size = 0;
ASSERT_EQ(true, file_util::GetFileSize(path, &size));
@@ -3700,7 +3702,7 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataBeforeStart) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
VerifyReceivedDataMatchesChunks(&r, &d);
}
@@ -3717,7 +3719,7 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataJustAfterStart) {
r.Start();
EXPECT_TRUE(r.is_pending());
AddChunksToUpload(&r);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
VerifyReceivedDataMatchesChunks(&r, &d);
}
@@ -3734,9 +3736,9 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataAfterStart) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
AddChunksToUpload(&r);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
VerifyReceivedDataMatchesChunks(&r, &d);
}
@@ -3749,7 +3751,7 @@ TEST_F(URLRequestTestHTTP, ResponseHeadersTest) {
URLRequest req(
test_server_.GetURL("files/with-headers.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const HttpResponseHeaders* headers = req.response_headers();
@@ -3785,7 +3787,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTS) {
&d,
&default_context_);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
TransportSecurityState* security_state =
default_context_.transport_security_state();
@@ -3812,7 +3814,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSOnce) {
&d,
&default_context_);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// We should have set parameters from the first header, not the second.
TransportSecurityState* security_state =
@@ -3840,7 +3842,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSAndPKP) {
&d,
&default_context_);
request.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// We should have set parameters from the first header, not the second.
TransportSecurityState* security_state =
@@ -3872,7 +3874,7 @@ TEST_F(URLRequestTestHTTP, ContentTypeNormalizationTest) {
URLRequest req(test_server_.GetURL(
"files/content-type-normalization.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
std::string mime_type;
req.GetMimeType(&mime_type);
@@ -3905,7 +3907,7 @@ TEST_F(URLRequestTestHTTP, RestrictRedirects) {
URLRequest req(test_server_.GetURL(
"files/redirect-to-file.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, req.status().status());
EXPECT_EQ(ERR_UNSAFE_REDIRECT, req.status().error());
@@ -3918,7 +3920,7 @@ TEST_F(URLRequestTestHTTP, RedirectToInvalidURL) {
URLRequest req(test_server_.GetURL(
"files/redirect-to-invalid-url.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(URLRequestStatus::FAILED, req.status().status());
EXPECT_EQ(ERR_INVALID_URL, req.status().error());
@@ -3932,7 +3934,7 @@ TEST_F(URLRequestTestHTTP, NoUserPassInReferrer) {
test_server_.GetURL("echoheader?Referer"), &d, &default_context_);
req.SetReferrer("http://user:pass@foo.com/");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(std::string("http://foo.com/"), d.data_received());
}
@@ -3945,7 +3947,7 @@ TEST_F(URLRequestTestHTTP, NoFragmentInReferrer) {
test_server_.GetURL("echoheader?Referer"), &d, &default_context_);
req.SetReferrer("http://foo.com/test#fragment");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(std::string("http://foo.com/test"), d.data_received());
}
@@ -3959,7 +3961,7 @@ TEST_F(URLRequestTestHTTP, EmptyReferrerAfterValidReferrer) {
req.SetReferrer("http://foo.com/test#fragment");
req.SetReferrer("");
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(std::string("None"), d.data_received());
}
@@ -3973,7 +3975,7 @@ TEST_F(URLRequestTestHTTP, CancelRedirect) {
URLRequest req(
test_server_.GetURL("files/redirect-test.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(0, d.bytes_received());
@@ -3991,12 +3993,12 @@ TEST_F(URLRequestTestHTTP, DeferredRedirect) {
URLRequest req(
test_server_.GetURL("files/redirect-test.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.received_redirect_count());
req.FollowDeferredRedirect();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4024,12 +4026,12 @@ TEST_F(URLRequestTestHTTP, CancelDeferredRedirect) {
URLRequest req(
test_server_.GetURL("files/redirect-test.html"), &d, &default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.received_redirect_count());
req.Cancel();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_EQ(0, d.bytes_received());
@@ -4050,7 +4052,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
headers.SetHeader("foo", "1");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
LoadTimingInfo load_timing_info;
req.GetLoadTimingInfo(&load_timing_info);
@@ -4066,7 +4068,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
headers.SetHeader("foo", "1");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(req.was_cached());
@@ -4084,7 +4086,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
headers.SetHeader("foo", "2");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_FALSE(req.was_cached());
@@ -4105,7 +4107,7 @@ TEST_F(URLRequestTestHTTP, BasicAuth) {
URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user/secret") != std::string::npos);
}
@@ -4121,7 +4123,7 @@ TEST_F(URLRequestTestHTTP, BasicAuth) {
r.set_load_flags(LOAD_VALIDATE_CACHE);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user/secret") != std::string::npos);
@@ -4152,7 +4154,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
URLRequest r(url_requiring_auth, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user/secret") != std::string::npos);
@@ -4181,7 +4183,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
URLRequest r(url_with_identity, &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user2/secret") != std::string::npos);
@@ -4203,7 +4205,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) {
URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user/secret") != std::string::npos);
@@ -4235,7 +4237,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) {
r.set_load_flags(LOAD_VALIDATE_CACHE);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(d.data_received().find("user/secret") != std::string::npos);
@@ -4278,7 +4280,7 @@ TEST_F(URLRequestTestHTTP, Post302RedirectGet) {
"Origin: http://localhost:1337/");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
std::string mime_type;
req.GetMimeType(&mime_type);
@@ -4361,7 +4363,7 @@ TEST_F(URLRequestTestHTTP, InterceptPost302RedirectGet) {
AddTestInterceptor()->set_main_intercept_job(job);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("GET", req.method());
}
@@ -4385,7 +4387,7 @@ TEST_F(URLRequestTestHTTP, InterceptPost307RedirectPost) {
AddTestInterceptor()->set_main_intercept_job(job);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("POST", req.method());
EXPECT_EQ(kData, d.data_received());
}
@@ -4405,7 +4407,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptLanguage) {
URLRequest req(
test_server_.GetURL("echoheader?Accept-Language"), &d, &context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("en", d.data_received());
}
@@ -4426,7 +4428,7 @@ TEST_F(URLRequestTestHTTP, EmptyAcceptLanguage) {
URLRequest req(
test_server_.GetURL("echoheader?Accept-Language"), &d, &context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("None", d.data_received());
}
@@ -4443,7 +4445,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptLanguage) {
headers.SetHeader(HttpRequestHeaders::kAcceptLanguage, "ru");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(std::string("ru"), d.data_received());
}
@@ -4458,7 +4460,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptEncoding) {
HttpRequestHeaders headers;
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(ContainsString(d.data_received(), "gzip"));
}
@@ -4475,7 +4477,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptEncoding) {
headers.SetHeader(HttpRequestHeaders::kAcceptEncoding, "identity");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_FALSE(ContainsString(d.data_received(), "gzip"));
EXPECT_TRUE(ContainsString(d.data_received(), "identity"));
}
@@ -4492,7 +4494,7 @@ TEST_F(URLRequestTestHTTP, SetAcceptCharset) {
headers.SetHeader(HttpRequestHeaders::kAcceptCharset, "koi-8r");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(std::string("koi-8r"), d.data_received());
}
@@ -4505,7 +4507,7 @@ TEST_F(URLRequestTestHTTP, DefaultUserAgent) {
&d,
&default_context_);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(req.context()->GetUserAgent(req.url()), d.data_received());
}
@@ -4522,7 +4524,7 @@ TEST_F(URLRequestTestHTTP, OverrideUserAgent) {
headers.SetHeader(HttpRequestHeaders::kUserAgent, "Lynx (textmode)");
req.SetExtraRequestHeaders(headers);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// If the net tests are being run with ChromeFrame then we need to allow for
// the 'chromeframe' suffix which is added to the user agent before the
// closing parentheses.
@@ -4554,7 +4556,7 @@ TEST_F(URLRequestTestHTTP, EmptyHttpUserAgentSettings) {
TestDelegate d;
URLRequest req(test_server_.GetURL(tests[i].request), &d, &context);
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(tests[i].expected_response, d.data_received())
<< " Request = \"" << tests[i].request << "\"";
}
@@ -4584,7 +4586,7 @@ TEST_F(URLRequestTestHTTP, SetSubsequentJobPriority) {
AddTestInterceptor()->set_main_intercept_job(job);
// Should trigger |job| to be started.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(LOW, job->priority());
}
@@ -4614,7 +4616,7 @@ TEST_F(HTTPSRequestTest, HTTPSGetTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4646,7 +4648,7 @@ TEST_F(HTTPSRequestTest, HTTPSMismatchedTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4682,7 +4684,7 @@ TEST_F(HTTPSRequestTest, HTTPSExpiredTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4725,7 +4727,7 @@ TEST_F(HTTPSRequestTest, TLSv1Fallback) {
URLRequest r(test_server.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_NE(0, d.bytes_received());
@@ -4769,7 +4771,7 @@ TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4817,7 +4819,7 @@ TEST_F(HTTPSRequestTest, HTTPSErrorsNoClobberTSSTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4886,7 +4888,7 @@ TEST_F(HTTPSRequestTest, HSTSPreservesPosts) {
req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData)));
req.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ("https", req.url().scheme());
EXPECT_EQ("POST", req.method());
@@ -4911,7 +4913,7 @@ TEST_F(HTTPSRequestTest, SSLv3Fallback) {
URLRequest r(test_server.GetURL(std::string()), &d, &context);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_NE(0, d.bytes_received());
@@ -4930,7 +4932,7 @@ class SSLClientAuthTestDelegate : public TestDelegate {
URLRequest* request,
SSLCertRequestInfo* cert_request_info) OVERRIDE {
on_certificate_requested_count_++;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
int on_certificate_requested_count() {
return on_certificate_requested_count_;
@@ -4962,7 +4964,7 @@ TEST_F(HTTPSRequestTest, ClientAuthTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.on_certificate_requested_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -4973,7 +4975,7 @@ TEST_F(HTTPSRequestTest, ClientAuthTest) {
// all platforms so we can test sending a cert as well.
r.ContinueWithCertificate(NULL);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
@@ -5002,7 +5004,7 @@ TEST_F(HTTPSRequestTest, ResumeTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
}
@@ -5018,7 +5020,7 @@ TEST_F(HTTPSRequestTest, ResumeTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// The response will look like;
// insert abc
@@ -5071,7 +5073,7 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
}
@@ -5102,7 +5104,7 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// The response will look like;
// insert abc
@@ -5203,7 +5205,7 @@ class HTTPSOCSPTest : public HTTPSRequestTest {
URLRequest r(test_server.GetURL(std::string()), &d, &context_);
r.Start();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_EQ(1, d.response_started_count());
*out_cert_status = r.ssl_info().cert_status;
@@ -5516,7 +5518,7 @@ TEST_F(URLRequestTestFTP, UnsafePort) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_FALSE(r.is_pending());
EXPECT_EQ(URLRequestStatus::FAILED, r.status().status());
@@ -5534,7 +5536,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPDirectoryListing) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_FALSE(r.is_pending());
EXPECT_EQ(1, d.response_started_count());
@@ -5560,7 +5562,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTestAnonymous) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5592,7 +5594,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTest) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5630,7 +5632,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPassword) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5663,7 +5665,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPasswordRestart) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5693,7 +5695,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUser) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5726,7 +5728,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUserRestart) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5758,7 +5760,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5776,7 +5778,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5810,7 +5812,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);
@@ -5831,7 +5833,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) {
r.Start();
EXPECT_TRUE(r.is_pending());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
int64 file_size = 0;
file_util::GetFileSize(app_path, &file_size);