| Index: net/url_request/url_request_unittest.cc
|
| diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
|
| index ba4d52a56994039b0015b7db4a3fc76b08eeae61..37a5cb529d1c466d2097200a9706a585224c775d 100644
|
| --- a/net/url_request/url_request_unittest.cc
|
| +++ b/net/url_request/url_request_unittest.cc
|
| @@ -662,7 +662,7 @@ TEST_F(URLRequestTest, AboutBlankTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - GURL("about:blank"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("about:blank"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -686,26 +686,27 @@ TEST_F(URLRequestTest, DataURLImageTest) {
|
| // Use our nice little Chrome logo.
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| GURL(
|
| - "data:image/png;base64,"
|
| - "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADVklEQVQ4jX2TfUwUBBjG3"
|
| - "w1y+HGcd9dxhXR8T4awOccJGgOSWclHImznLkTlSw0DDQXkrmgYgbUYnlQTqQxIEVxitD"
|
| - "5UMCATRA1CEEg+Qjw3bWDxIauJv/5oumqs39/P827vnucRmYN0gyF01GI5MpCVdW0gO7t"
|
| - "vNC+vqSEtbZefk5NuLv1jdJ46p/zw0HeH4+PHr3h7c1mjoV2t5rKzMx1+fg9bAgK6zHq9"
|
| - "cU5z+LpA3xOtx34+vTeT21onRuzssC3zxbbSwC13d/pFuC7CkIMDxQpF7r/MWq12UctI1"
|
| - "dWWm99ypqSYmRUBdKem8MkrO/kgaTt1O7YzlpzE5GIVd0WYUqt57yWf2McHTObYPbVD+Z"
|
| - "wbtlLTVMZ3BW+TnLyXLaWtmEq6WJVbT3HBh3Svj2HQQcm43XwmtoYM6vVKleh0uoWvnzW"
|
| - "3v3MpidruPTQPf0bia7sJOtBM0ufTWNvus/nkDFHF9ZS+uYVjRUasMeHUmyLYtcklTvzW"
|
| - "GFZnNOXczThvpKIzjcahSqIzkvDLayDq6D3eOjtBbNUEIZYyqsvj4V4wY92eNJ4IoyhTb"
|
| - "xXX1T5xsV9tm9r4TQwHLiZw/pdDZJea8TKmsmR/K0uLh/GwnCHghTja6lPhphezPfO5/5"
|
| - "MrVvMzNaI3+ERHfrFzPKQukrQGI4d/3EFD/3E2mVNYvi4at7CXWREaxZGD+3hg28zD3gV"
|
| - "Md6q5c8GdosynKmSeRuGzpjyl1/9UDGtPR5HeaKT8Wjo17WXk579BXVUhN64ehF9fhRtq"
|
| - "/uxxZKzNiZFGD0wRC3NFROZ5mwIPL/96K/rKMMLrIzF9uhHr+/sYH7DAbwlgC4J+R2Z7F"
|
| - "Ux1qLnV7MGF40smVSoJ/jvHRfYhQeUJd/SnYtGWhPHR0Sz+GE2F2yth0B36Vcz2KpnufB"
|
| - "JbsysjjW4kblBUiIjiURUWqJY65zxbnTy57GQyH58zgy0QBtTQv5gH15XMdKkYu+TGaJM"
|
| - "nlm2O34uI4b9tflqp1+QEFGzoW/ulmcofcpkZCYJhDfSpme7QcrHa+Xfji8paEQkTkSfm"
|
| - "moRWRNZr/F1KfVMjW+IKEnv2FwZfKdzt0BQR6lClcZR0EfEXEfv/G6W9iLiIyCoReV5En"
|
| - "hORIBHx+ufPj/gLB/zGI/G4Bk0AAAAASUVORK5CYII="),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + "data:image/png;base64,"
|
| + "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADVklEQVQ4jX2TfUwUB"
|
| + "BjG3w1y+HGcd9dxhXR8T4awOccJGgOSWclHImznLkTlSw0DDQXkrmgYgbUYnlQTqQ"
|
| + "xIEVxitD5UMCATRA1CEEg+Qjw3bWDxIauJv/5oumqs39/P827vnucRmYN0gyF01GI"
|
| + "5MpCVdW0gO7tvNC+vqSEtbZefk5NuLv1jdJ46p/zw0HeH4+PHr3h7c1mjoV2t5rKz"
|
| + "Mx1+fg9bAgK6zHq9cU5z+LpA3xOtx34+vTeT21onRuzssC3zxbbSwC13d/pFuC7Ck"
|
| + "IMDxQpF7r/MWq12UctI1dWWm99ypqSYmRUBdKem8MkrO/kgaTt1O7YzlpzE5GIVd0"
|
| + "WYUqt57yWf2McHTObYPbVD+ZwbtlLTVMZ3BW+TnLyXLaWtmEq6WJVbT3HBh3Svj2H"
|
| + "QQcm43XwmtoYM6vVKleh0uoWvnzW3v3MpidruPTQPf0bia7sJOtBM0ufTWNvus/nk"
|
| + "DFHF9ZS+uYVjRUasMeHUmyLYtcklTvzWGFZnNOXczThvpKIzjcahSqIzkvDLayDq6"
|
| + "D3eOjtBbNUEIZYyqsvj4V4wY92eNJ4IoyhTbxXX1T5xsV9tm9r4TQwHLiZw/pdDZJ"
|
| + "ea8TKmsmR/K0uLh/GwnCHghTja6lPhphezPfO5/5MrVvMzNaI3+ERHfrFzPKQukrQ"
|
| + "GI4d/3EFD/3E2mVNYvi4at7CXWREaxZGD+3hg28zD3gVMd6q5c8GdosynKmSeRuGz"
|
| + "pjyl1/9UDGtPR5HeaKT8Wjo17WXk579BXVUhN64ehF9fhRtq/uxxZKzNiZFGD0wRC"
|
| + "3NFROZ5mwIPL/96K/rKMMLrIzF9uhHr+/sYH7DAbwlgC4J+R2Z7FUx1qLnV7MGF40"
|
| + "smVSoJ/jvHRfYhQeUJd/SnYtGWhPHR0Sz+GE2F2yth0B36Vcz2KpnufBJbsysjjW4"
|
| + "kblBUiIjiURUWqJY65zxbnTy57GQyH58zgy0QBtTQv5gH15XMdKkYu+TGaJMnlm2O"
|
| + "34uI4b9tflqp1+QEFGzoW/ulmcofcpkZCYJhDfSpme7QcrHa+Xfji8paEQkTkSfmm"
|
| + "oRWRNZr/F1KfVMjW+IKEnv2FwZfKdzt0BQR6lClcZR0EfEXEfv/G6W9iLiIyCoReV"
|
| + "5EnhORIBHx+ufPj/gLB/zGI/G4Bk0AAAAASUVORK5CYII="),
|
| + DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -731,8 +732,8 @@ TEST_F(URLRequestTest, FileTest) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - app_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(app_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -761,8 +762,8 @@ TEST_F(URLRequestTest, FileTestCancel) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - app_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(app_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -794,8 +795,8 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - temp_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
|
|
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(
|
| @@ -839,8 +840,8 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - temp_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
|
|
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kRange,
|
| @@ -877,8 +878,8 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - temp_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(temp_url, DEFAULT_PRIORITY, &d));
|
|
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kRange, "bytes=0-0,10-200,200-300");
|
| @@ -907,8 +908,8 @@ TEST_F(URLRequestTest, AllowFileURLs) {
|
| TestNetworkDelegate network_delegate;
|
| network_delegate.set_can_access_files(true);
|
| default_context_.set_network_delegate(&network_delegate);
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_file_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(test_file_url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
| EXPECT_FALSE(d.request_failed());
|
| @@ -920,8 +921,8 @@ TEST_F(URLRequestTest, AllowFileURLs) {
|
| TestNetworkDelegate network_delegate;
|
| network_delegate.set_can_access_files(false);
|
| default_context_.set_network_delegate(&network_delegate);
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_file_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(test_file_url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
| EXPECT_TRUE(d.request_failed());
|
| @@ -942,7 +943,7 @@ TEST_F(URLRequestTest, FileDirCancelTest) {
|
| file_path = file_path.Append(FILE_PATH_LITERAL("data"));
|
|
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - FilePathToFileURL(file_path), DEFAULT_PRIORITY, &d, NULL));
|
| + FilePathToFileURL(file_path), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| EXPECT_TRUE(req->is_pending());
|
|
|
| @@ -969,7 +970,7 @@ TEST_F(URLRequestTest, FileDirOutputSanity) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - FilePathToFileURL(path), DEFAULT_PRIORITY, &d, NULL));
|
| + FilePathToFileURL(path), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -1006,7 +1007,7 @@ TEST_F(URLRequestTest, FileDirRedirectNoCrash) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - FilePathToFileURL(path), DEFAULT_PRIORITY, &d, NULL));
|
| + FilePathToFileURL(path), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -1020,8 +1021,8 @@ TEST_F(URLRequestTest, FileDirRedirectNoCrash) {
|
| // Don't accept the url "file:///" on windows. See http://crbug.com/1474.
|
| TEST_F(URLRequestTest, FileDirRedirectSingleSlash) {
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("file:///"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(GURL("file:///"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -1036,7 +1037,7 @@ TEST_F(URLRequestTest, InvalidUrlTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - GURL("invalid url"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("invalid url"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -1052,8 +1053,8 @@ TEST_F(URLRequestTest, InvalidReferrerTest) {
|
| network_delegate.set_cancel_request_with_policy_violating_referrer(true);
|
| context.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://localhost/"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(GURL("http://localhost/"), DEFAULT_PRIORITY, &d));
|
| req->SetReferrer("https://somewhere.com/");
|
|
|
| req->Start();
|
| @@ -1089,8 +1090,7 @@ TEST_F(URLRequestTest, ResolveShortcutTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - FilePathToFileURL(base::FilePath(lnk_path)), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + FilePathToFileURL(base::FilePath(lnk_path)), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -1474,7 +1474,7 @@ TEST_F(URLRequestInterceptorTest, Intercept) {
|
| interceptor()->set_main_data(MockURLRequestInterceptor::ok_data());
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| base::SupportsUserData::Data* user_data0 = new base::SupportsUserData::Data();
|
| base::SupportsUserData::Data* user_data1 = new base::SupportsUserData::Data();
|
| base::SupportsUserData::Data* user_data2 = new base::SupportsUserData::Data();
|
| @@ -1512,7 +1512,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRedirect) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1544,7 +1544,7 @@ TEST_F(URLRequestInterceptorTest, InterceptServerError) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1572,7 +1572,7 @@ TEST_F(URLRequestInterceptorTest, InterceptNetworkError) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1600,7 +1600,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRestartRequired) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1630,7 +1630,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRespectsCancelMain) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1661,7 +1661,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRespectsCancelRedirect) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1685,7 +1685,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRespectsCancelFinal) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1710,7 +1710,7 @@ TEST_F(URLRequestInterceptorTest, InterceptRespectsCancelInRestart) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -1782,7 +1782,7 @@ LoadTimingInfo RunURLRequestInterceptorLoadTimingTest(
|
| interceptor->set_main_request_load_timing_info(job_load_timing);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, nullptr));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -1998,10 +1998,10 @@ TEST_F(URLRequestInterceptorTest, InterceptLoadTimingEarlyConnectWithProxy) {
|
| TEST_F(URLRequestTest, Identifiers) {
|
| TestDelegate d;
|
| TestURLRequestContext context;
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
|
| - scoped_ptr<URLRequest> other_req(context.CreateRequest(
|
| - GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
|
| + scoped_ptr<URLRequest> other_req(
|
| + context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
|
|
|
| ASSERT_NE(req->identifier(), other_req->identifier());
|
| }
|
| @@ -2016,8 +2016,8 @@ TEST_F(URLRequestTest, NetworkDelegateProxyError) {
|
| TestURLRequestContextWithProxy context("myproxy:70", &network_delegate);
|
|
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(GURL("http://example.com"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
|
|
| req->Start();
|
| @@ -2039,8 +2039,8 @@ TEST_F(URLRequestTest, NetworkDelegateProxyError) {
|
| // content is empty.
|
| TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) {
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("data:,"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(GURL("data:,"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ("", d.data_received());
|
| @@ -2052,7 +2052,7 @@ TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) {
|
| TEST_F(URLRequestTest, SetPriorityBasic) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
|
|
|
| req->SetPriority(LOW);
|
| @@ -2070,7 +2070,7 @@ TEST_F(URLRequestTest, SetPriorityBasic) {
|
| TEST_F(URLRequestTest, SetJobPriorityBeforeJobStart) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
| EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
|
|
|
| scoped_refptr<URLRequestTestJob> job =
|
| @@ -2089,7 +2089,7 @@ TEST_F(URLRequestTest, SetJobPriorityBeforeJobStart) {
|
| TEST_F(URLRequestTest, SetJobPriority) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d));
|
|
|
| scoped_refptr<URLRequestTestJob> job =
|
| new URLRequestTestJob(req.get(), &default_network_delegate_);
|
| @@ -2109,7 +2109,7 @@ TEST_F(URLRequestTest, SetJobPriority) {
|
| TEST_F(URLRequestTest, PriorityIgnoreLimits) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - GURL("http://test_intercept/foo"), MAXIMUM_PRIORITY, &d, NULL));
|
| + GURL("http://test_intercept/foo"), MAXIMUM_PRIORITY, &d));
|
| EXPECT_EQ(MAXIMUM_PRIORITY, req->priority());
|
|
|
| scoped_refptr<URLRequestTestJob> job =
|
| @@ -2162,7 +2162,7 @@ TEST_F(URLRequestTest, DelayedCookieCallback) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
|
| @@ -2176,7 +2176,7 @@ TEST_F(URLRequestTest, DelayedCookieCallback) {
|
| context.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2198,7 +2198,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
|
| @@ -2211,7 +2211,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2227,7 +2227,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->SetLoadFlags(LOAD_DO_NOT_SEND_COOKIES);
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -2252,7 +2252,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2268,7 +2268,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->SetLoadFlags(LOAD_DO_NOT_SAVE_COOKIES);
|
| req->Start();
|
|
|
| @@ -2286,7 +2286,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2312,7 +2312,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2326,7 +2326,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2344,7 +2344,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
|
| TestDelegate d;
|
| network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2367,7 +2367,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2383,7 +2383,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
|
| network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -2398,7 +2398,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2422,7 +2422,7 @@ TEST_F(URLRequestTest, DoNotSaveEmptyCookies) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("set-cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("set-cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2443,7 +2443,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSend=1"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2457,7 +2457,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2475,7 +2475,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
|
| TestDelegate d;
|
| network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2498,7 +2498,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotUpdate=2"), DEFAULT_PRIORITY,
|
| - &d, NULL));
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2514,7 +2514,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
|
| network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -2529,7 +2529,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2558,7 +2558,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesEnabled) {
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL(
|
| "set-cookie?FirstPartyCookieToSet=1;First-Party-Only"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
|
| @@ -2573,7 +2573,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesEnabled) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->set_first_party_for_cookies(test_server.GetURL(""));
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -2591,7 +2591,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesEnabled) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->set_first_party_for_cookies(GURL("http://third-party.test/"));
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -2618,7 +2618,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesDisabled) {
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL(
|
| "set-cookie?FirstPartyCookieToSet=1;First-Party-Only"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
|
| @@ -2633,7 +2633,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesDisabled) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->set_first_party_for_cookies(test_server.GetURL(""));
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -2651,7 +2651,7 @@ TEST_F(URLRequestTest, FirstPartyOnlyCookiesDisabled) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->set_first_party_for_cookies(GURL("http://third-party.test/"));
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -2720,7 +2720,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL(
|
| "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| }
|
| @@ -2730,7 +2730,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2744,7 +2744,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server.GetURL(
|
| "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| }
|
| @@ -2754,7 +2754,7 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) {
|
| default_context_.set_network_delegate(&network_delegate);
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Cookie"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -2774,7 +2774,7 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d));
|
| req->SetReferrer("http://foo.com/");
|
|
|
| HttpRequestHeaders headers;
|
| @@ -2792,7 +2792,7 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d));
|
|
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kReferer, "http://bar.com/");
|
| @@ -2827,8 +2827,8 @@ class URLRequestTestHTTP : public URLRequestTest {
|
| bool include_data) {
|
| static const char kData[] = "hello world";
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - redirect_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
|
| req->set_method(request_method);
|
| if (include_data) {
|
| req->set_upload(CreateSimpleUploadData(kData));
|
| @@ -2874,7 +2874,7 @@ class URLRequestTestHTTP : public URLRequestTest {
|
| for (int i = 0; i < kIterations; ++i) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->set_method(method.c_str());
|
|
|
| r->set_upload(CreateSimpleUploadData(uploadBytes));
|
| @@ -2922,8 +2922,8 @@ class URLRequestTestHTTP : public URLRequestTest {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURL("set-many-cookies?" +
|
| - base::IntToString(num_cookies)),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + base::IntToString(num_cookies)),
|
| + DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -2965,7 +2965,7 @@ TEST_F(URLRequestTestHTTP, ProxyTunnelRedirectTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -2993,7 +2993,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateTunnelConnectionFailed) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -3037,7 +3037,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateBlockAsynchronously) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| for (size_t i = 0; i < blocking_stages_length; ++i) {
|
| @@ -3070,7 +3070,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelRequest) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3102,8 +3102,7 @@ void NetworkDelegateCancelRequest(BlockingNetworkDelegate::BlockMode block_mode,
|
| context.Init();
|
|
|
| {
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3181,8 +3180,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequest) {
|
|
|
| {
|
| GURL original_url(test_server_.GetURL("empty.html"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| // Quit after hitting the redirect, so can check the headers.
|
| d.set_quit_on_redirect(true);
|
| @@ -3235,8 +3234,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestSynchronously) {
|
|
|
| {
|
| GURL original_url(test_server_.GetURL("empty.html"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| // Quit after hitting the redirect, so can check the headers.
|
| d.set_quit_on_redirect(true);
|
| @@ -3292,8 +3291,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestPost) {
|
|
|
| {
|
| GURL original_url(test_server_.GetURL("empty.html"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
| r->set_method("POST");
|
| r->set_upload(CreateSimpleUploadData(kData));
|
| HttpRequestHeaders headers;
|
| @@ -3349,8 +3348,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestOnHeadersReceived) {
|
|
|
| {
|
| GURL original_url(test_server_.GetURL("empty.html"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3392,8 +3391,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncNoAction) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -3424,8 +3422,7 @@ TEST_F(URLRequestTestHTTP,
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| {
|
| @@ -3466,8 +3463,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncSetAuth) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3502,8 +3498,7 @@ TEST_F(URLRequestTestHTTP,
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3541,8 +3536,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncCancel) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3576,8 +3570,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncNoAction) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3612,8 +3605,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncSetAuth) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3646,8 +3638,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncCancel) {
|
|
|
| {
|
| GURL url(test_server_.GetURL("auth-basic"));
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(context.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -3678,7 +3669,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting1) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3715,7 +3706,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting2) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3751,7 +3742,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting3) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3787,7 +3778,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting4) {
|
|
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -3819,7 +3810,7 @@ TEST_F(URLRequestTestHTTP, UnexpectedServerAuthTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - GURL("https://www.server-auth.com/"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("https://www.server-auth.com/"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -3839,7 +3830,7 @@ TEST_F(URLRequestTestHTTP, GetTest_NoCache) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -3906,7 +3897,7 @@ TEST_F(URLRequestTestHTTP, GetTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -3929,8 +3920,8 @@ TEST_F(URLRequestTestHTTP, GetTest_GetFullRequestHeaders) {
|
| TestDelegate d;
|
| {
|
| GURL test_url(test_server_.GetURL(std::string()));
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
|
|
|
| HttpRequestHeaders headers;
|
| EXPECT_FALSE(r->GetFullRequestHeaders(&headers));
|
| @@ -3959,7 +3950,7 @@ TEST_F(URLRequestTestHTTP, GetTestLoadTiming) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -4010,7 +4001,7 @@ TEST_F(URLRequestTestHTTP, GetZippedTest) {
|
| context.Init();
|
|
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL(test_file), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(test_file), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -4040,8 +4031,8 @@ TEST_F(URLRequestTestHTTP, RedirectLoadTiming) {
|
| GURL original_url =
|
| test_server_.GetURL("server-redirect?" + destination_url.spec());
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -4081,8 +4072,8 @@ TEST_F(URLRequestTestHTTP, MultipleRedirectTest) {
|
| GURL original_url = test_server_.GetURL(
|
| "server-redirect?" + middle_redirect_url.spec());
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -4412,9 +4403,9 @@ TEST_F(URLRequestTestHTTP, DelegateInfoBeforeStart) {
|
| context.Init();
|
|
|
| {
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &request_delegate,
|
| - NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(test_server_.GetURL("empty.html"),
|
| + DEFAULT_PRIORITY, &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| EXPECT_EQ(LOAD_STATE_IDLE, load_state.state);
|
| EXPECT_EQ(base::string16(), load_state.param);
|
| @@ -4459,9 +4450,9 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfo) {
|
| context.Init();
|
|
|
| {
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL("simple.html"), DEFAULT_PRIORITY, &request_delegate,
|
| - NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(test_server_.GetURL("simple.html"),
|
| + DEFAULT_PRIORITY, &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| EXPECT_EQ(LOAD_STATE_IDLE, load_state.state);
|
| EXPECT_EQ(base::string16(), load_state.param);
|
| @@ -4518,7 +4509,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoRedirect) {
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY,
|
| - &request_delegate, NULL));
|
| + &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| EXPECT_EQ(LOAD_STATE_IDLE, load_state.state);
|
| EXPECT_EQ(base::string16(), load_state.param);
|
| @@ -4598,9 +4589,9 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoAuth) {
|
| context.Init();
|
|
|
| {
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &request_delegate,
|
| - NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(test_server_.GetURL("auth-basic"),
|
| + DEFAULT_PRIORITY, &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| EXPECT_EQ(LOAD_STATE_IDLE, load_state.state);
|
| EXPECT_EQ(base::string16(), load_state.param);
|
| @@ -4664,7 +4655,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfo) {
|
| // that it occurs.
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| test_server_.GetURL("chunked?waitBetweenChunks=20"), DEFAULT_PRIORITY,
|
| - &request_delegate, NULL));
|
| + &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -4717,7 +4708,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfoOnRedirect) {
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY,
|
| - &request_delegate, NULL));
|
| + &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -4781,7 +4772,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateOnRedirectCancelled) {
|
| {
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY,
|
| - &request_delegate, NULL));
|
| + &request_delegate));
|
| LoadStateWithParam load_state = r->GetLoadState();
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -4847,8 +4838,8 @@ TEST_F(URLRequestTestHTTP, RedirectWithAdditionalHeadersTest) {
|
| GURL original_url = test_server_.GetURL(
|
| "server-redirect?" + destination_url.spec());
|
| RedirectWithAdditionalHeadersDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -4884,8 +4875,8 @@ TEST_F(URLRequestTestHTTP, RedirectWithHeaderRemovalTest) {
|
| GURL original_url = test_server_.GetURL(
|
| "server-redirect?" + destination_url.spec());
|
| RedirectWithHeaderRemovalDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
| req->SetExtraRequestHeaderByName(kExtraHeaderToRemove, "dummy", false);
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -4902,7 +4893,7 @@ TEST_F(URLRequestTestHTTP, CancelTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - GURL("http://www.google.com/"), DEFAULT_PRIORITY, &d, NULL));
|
| + GURL("http://www.google.com/"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -4925,7 +4916,7 @@ TEST_F(URLRequestTestHTTP, CancelTest2) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| d.set_cancel_in_response_started(true);
|
|
|
| @@ -4947,7 +4938,7 @@ TEST_F(URLRequestTestHTTP, CancelTest3) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| d.set_cancel_in_received_data(true);
|
|
|
| @@ -4972,7 +4963,7 @@ TEST_F(URLRequestTestHTTP, CancelTest4) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -4999,7 +4990,7 @@ TEST_F(URLRequestTestHTTP, CancelTest5) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("cachetime"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("cachetime"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status());
|
| @@ -5009,7 +5000,7 @@ TEST_F(URLRequestTestHTTP, CancelTest5) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("cachetime"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("cachetime"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| r->Cancel();
|
| base::RunLoop().Run();
|
| @@ -5037,7 +5028,7 @@ TEST_F(URLRequestTestHTTP, PostEmptyTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->set_method("POST");
|
|
|
| r->Start();
|
| @@ -5060,7 +5051,7 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->set_method("POST");
|
|
|
| base::FilePath dir;
|
| @@ -5114,7 +5105,7 @@ TEST_F(URLRequestTestHTTP, PostUnreadableFileTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->set_method("POST");
|
|
|
| ScopedVector<UploadElementReader> element_readers;
|
| @@ -5148,7 +5139,7 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataBeforeStart) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->EnableChunkedUpload();
|
| r->set_method("POST");
|
| AddChunksToUpload(r.get());
|
| @@ -5167,7 +5158,7 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataJustAfterStart) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->EnableChunkedUpload();
|
| r->set_method("POST");
|
| r->Start();
|
| @@ -5185,7 +5176,7 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataAfterStart) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d));
|
| r->EnableChunkedUpload();
|
| r->set_method("POST");
|
| r->Start();
|
| @@ -5204,8 +5195,7 @@ TEST_F(URLRequestTestHTTP, ResponseHeadersTest) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/with-headers.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/with-headers.html"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5239,8 +5229,8 @@ TEST_F(URLRequestTestHTTP, ProcessSTS) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| - https_test_server.GetURL("files/hsts-headers.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + https_test_server.GetURL("files/hsts-headers.html"), DEFAULT_PRIORITY,
|
| + &d));
|
| request->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5281,8 +5271,8 @@ TEST_F(URLRequestTestHTTP, MAYBE_ProcessPKP) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| - https_test_server.GetURL("files/hpkp-headers.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + https_test_server.GetURL("files/hpkp-headers.html"), DEFAULT_PRIORITY,
|
| + &d));
|
| request->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5310,7 +5300,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSOnce) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| https_test_server.GetURL("files/hsts-multiple-headers.html"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| request->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5337,7 +5327,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSAndPKP) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| https_test_server.GetURL("files/hsts-and-hpkp-headers.html"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| request->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5376,7 +5366,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSAndPKP2) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| https_test_server.GetURL("files/hsts-and-hpkp-headers2.html"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| request->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5404,7 +5394,7 @@ TEST_F(URLRequestTestHTTP, ContentTypeNormalizationTest) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server_.GetURL("files/content-type-normalization.html"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5444,8 +5434,8 @@ TEST_F(URLRequestTestHTTP, RestrictFileRedirects) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/redirect-to-file.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/redirect-to-file.html"), DEFAULT_PRIORITY,
|
| + &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5459,8 +5449,8 @@ TEST_F(URLRequestTestHTTP, RestrictDataRedirects) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/redirect-to-data.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/redirect-to-data.html"), DEFAULT_PRIORITY,
|
| + &d));
|
| req->Start();
|
| base::MessageLoop::current()->Run();
|
|
|
| @@ -5474,7 +5464,7 @@ TEST_F(URLRequestTestHTTP, RedirectToInvalidURL) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| test_server_.GetURL("files/redirect-to-invalid-url.html"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5490,8 +5480,8 @@ TEST_F(URLRequestTestHTTP, CacheRedirect) {
|
|
|
| {
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - redirect_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(URLRequestStatus::SUCCESS, req->status().status());
|
| @@ -5502,8 +5492,8 @@ TEST_F(URLRequestTestHTTP, CacheRedirect) {
|
| {
|
| TestDelegate d;
|
| d.set_quit_on_redirect(true);
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - redirect_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(redirect_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5534,8 +5524,8 @@ TEST_F(URLRequestTestHTTP, NoCacheOnNetworkDelegateRedirect) {
|
| redirect_to_url);
|
|
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - initial_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(initial_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(URLRequestStatus::SUCCESS, req->status().status());
|
| @@ -5545,8 +5535,8 @@ TEST_F(URLRequestTestHTTP, NoCacheOnNetworkDelegateRedirect) {
|
|
|
| {
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - initial_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(initial_url, DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5569,7 +5559,7 @@ TEST_F(URLRequestTestHTTP, UnsafeRedirectToWhitelistedUnsafeURL) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("whatever"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("whatever"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -5597,7 +5587,7 @@ TEST_F(URLRequestTestHTTP, UnsafeRedirectToDifferentUnsafeURL) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("whatever"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("whatever"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -5621,8 +5611,8 @@ TEST_F(URLRequestTestHTTP, UnsafeRedirectWithDifferentReferenceFragment) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -5650,8 +5640,8 @@ TEST_F(URLRequestTestHTTP, RedirectWithReferenceFragmentAndUnrelatedUnsafeUrl) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -5678,8 +5668,8 @@ TEST_F(URLRequestTestHTTP, RedirectWithReferenceFragment) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -5701,8 +5691,8 @@ TEST_F(URLRequestTestHTTP, RedirectJobWithReferenceFragment) {
|
| GURL redirect_url(test_server_.GetURL("echo"));
|
|
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| URLRequestRedirectJob* job = new URLRequestRedirectJob(
|
| r.get(), &default_network_delegate_, redirect_url,
|
| @@ -5723,7 +5713,7 @@ TEST_F(URLRequestTestHTTP, NoUserPassInReferrer) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d));
|
| req->SetReferrer("http://user:pass@foo.com/");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5736,7 +5726,7 @@ TEST_F(URLRequestTestHTTP, NoFragmentInReferrer) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d));
|
| req->SetReferrer("http://foo.com/test#fragment");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5749,7 +5739,7 @@ TEST_F(URLRequestTestHTTP, EmptyReferrerAfterValidReferrer) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("echoheader?Referer"), DEFAULT_PRIORITY, &d));
|
| req->SetReferrer("http://foo.com/test#fragment");
|
| req->SetReferrer("");
|
| req->Start();
|
| @@ -5767,8 +5757,8 @@ TEST_F(URLRequestTestHTTP, DeferredBeforeNetworkStart) {
|
| {
|
| d.set_quit_on_network_start(true);
|
| GURL test_url(test_server_.GetURL("echo"));
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
|
|
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5795,8 +5785,7 @@ TEST_F(URLRequestTestHTTP, BeforeNetworkStartCalledOnce) {
|
| d.set_quit_on_redirect(true);
|
| d.set_quit_on_network_start(true);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("server-redirect?echo"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("server-redirect?echo"), DEFAULT_PRIORITY, &d));
|
|
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5830,8 +5819,8 @@ TEST_F(URLRequestTestHTTP, CancelOnBeforeNetworkStart) {
|
| {
|
| d.set_quit_on_network_start(true);
|
| GURL test_url(test_server_.GetURL("echo"));
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
|
|
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5855,8 +5844,7 @@ TEST_F(URLRequestTestHTTP, CancelRedirect) {
|
| {
|
| d.set_cancel_in_received_redirect(true);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/redirect-test.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/redirect-test.html"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5874,8 +5862,8 @@ TEST_F(URLRequestTestHTTP, DeferredRedirect) {
|
| {
|
| d.set_quit_on_redirect(true);
|
| GURL test_url(test_server_.GetURL("files/redirect-test.html"));
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
|
|
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -5909,8 +5897,8 @@ TEST_F(URLRequestTestHTTP, DeferredRedirect_GetFullRequestHeaders) {
|
| {
|
| d.set_quit_on_redirect(true);
|
| GURL test_url(test_server_.GetURL("files/redirect-test.html"));
|
| - scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + default_context_.CreateRequest(test_url, DEFAULT_PRIORITY, &d));
|
|
|
| EXPECT_FALSE(d.have_full_request_headers());
|
|
|
| @@ -5952,8 +5940,7 @@ TEST_F(URLRequestTestHTTP, CancelDeferredRedirect) {
|
| {
|
| d.set_quit_on_redirect(true);
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/redirect-test.html"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/redirect-test.html"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -5976,8 +5963,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader("foo", "1");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -5993,8 +5979,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader("foo", "1");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6012,8 +5997,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheadercache?foo"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader("foo", "2");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6037,7 +6021,7 @@ TEST_F(URLRequestTestHTTP, BasicAuth) {
|
| d.set_credentials(AuthCredentials(kUser, kSecret));
|
|
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -6053,7 +6037,7 @@ TEST_F(URLRequestTestHTTP, BasicAuth) {
|
| d.set_credentials(AuthCredentials(kUser, kSecret));
|
|
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d));
|
| r->SetLoadFlags(LOAD_VALIDATE_CACHE);
|
| r->Start();
|
|
|
| @@ -6085,8 +6069,8 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
|
| TestDelegate d;
|
| d.set_credentials(AuthCredentials(kUser, kSecret));
|
|
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url_requiring_auth, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(url_requiring_auth, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -6113,8 +6097,8 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
|
| replacements.SetPasswordStr("secret");
|
| GURL url_with_identity = url_requiring_auth.ReplaceComponents(replacements);
|
|
|
| - scoped_ptr<URLRequest> r(context.CreateRequest(
|
| - url_with_identity, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + context.CreateRequest(url_with_identity, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -6137,7 +6121,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) {
|
| d.set_credentials(AuthCredentials(kUser, kSecret));
|
|
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -6169,7 +6153,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) {
|
| d.set_credentials(AuthCredentials(kUser, kSecret));
|
|
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d));
|
| r->SetLoadFlags(LOAD_VALIDATE_CACHE);
|
| r->Start();
|
|
|
| @@ -6199,8 +6183,7 @@ TEST_F(URLRequestTestHTTP, Post302RedirectGet) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("files/redirect-to-echoall"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("files/redirect-to-echoall"), DEFAULT_PRIORITY, &d));
|
| req->set_method("POST");
|
| req->set_upload(CreateSimpleUploadData(kData));
|
|
|
| @@ -6299,8 +6282,8 @@ TEST_F(URLRequestTestHTTP, NoRedirectOn308WithoutLocationHeader) {
|
| TestDelegate d;
|
| const GURL url = test_server_.GetURL("files/308-without-location-header");
|
|
|
| - scoped_ptr<URLRequest> request(default_context_.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> request(
|
| + default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
|
|
| request->Start();
|
| base::RunLoop().Run();
|
| @@ -6319,8 +6302,8 @@ TEST_F(URLRequestTestHTTP, Redirect302PreserveReferenceFragment) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - original_url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(original_url, DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| base::RunLoop().Run();
|
| @@ -6341,8 +6324,8 @@ TEST_F(URLRequestTestHTTP, RedirectPreserveFirstPartyURL) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->set_first_party_for_cookies(first_party_url);
|
|
|
| r->Start();
|
| @@ -6364,8 +6347,8 @@ TEST_F(URLRequestTestHTTP, RedirectUpdateFirstPartyURL) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->set_first_party_for_cookies(original_first_party_url);
|
| r->set_first_party_url_policy(
|
| URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
|
| @@ -6387,7 +6370,7 @@ TEST_F(URLRequestTestHTTP, InterceptPost302RedirectGet) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d));
|
| req->set_method("POST");
|
| req->set_upload(CreateSimpleUploadData(kData));
|
| HttpRequestHeaders headers;
|
| @@ -6412,7 +6395,7 @@ TEST_F(URLRequestTestHTTP, InterceptPost307RedirectPost) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d));
|
| req->set_method("POST");
|
| req->set_upload(CreateSimpleUploadData(kData));
|
| HttpRequestHeaders headers;
|
| @@ -6445,8 +6428,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptLanguage) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ("en", d.data_received());
|
| @@ -6468,8 +6450,7 @@ TEST_F(URLRequestTestHTTP, EmptyAcceptLanguage) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ("None", d.data_received());
|
| @@ -6482,8 +6463,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptLanguage) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Language"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kAcceptLanguage, "ru");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6498,8 +6478,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptEncoding) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Encoding"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Encoding"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| req->SetExtraRequestHeaders(headers);
|
| req->Start();
|
| @@ -6514,8 +6493,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptEncoding) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Encoding"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Encoding"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kAcceptEncoding, "identity");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6531,8 +6509,7 @@ TEST_F(URLRequestTestHTTP, SetAcceptCharset) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?Accept-Charset"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?Accept-Charset"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kAcceptCharset, "koi-8r");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6547,8 +6524,7 @@ TEST_F(URLRequestTestHTTP, DefaultUserAgent) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?User-Agent"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?User-Agent"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(default_context_.http_user_agent_settings()->GetUserAgent(),
|
| @@ -6562,8 +6538,7 @@ TEST_F(URLRequestTestHTTP, OverrideUserAgent) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("echoheader?User-Agent"), DEFAULT_PRIORITY, &d,
|
| - NULL));
|
| + test_server_.GetURL("echoheader?User-Agent"), DEFAULT_PRIORITY, &d));
|
| HttpRequestHeaders headers;
|
| headers.SetHeader(HttpRequestHeaders::kUserAgent, "Lynx (textmode)");
|
| req->SetExtraRequestHeaders(headers);
|
| @@ -6596,7 +6571,7 @@ TEST_F(URLRequestTestHTTP, EmptyHttpUserAgentSettings) {
|
| for (size_t i = 0; i < arraysize(tests); i++) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - test_server_.GetURL(tests[i].request), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL(tests[i].request), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
| EXPECT_EQ(tests[i].expected_response, d.data_received())
|
| @@ -6611,7 +6586,7 @@ TEST_F(URLRequestTestHTTP, SetSubsequentJobPriority) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context_.CreateRequest(
|
| - test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d));
|
| EXPECT_EQ(DEFAULT_PRIORITY, req->priority());
|
|
|
| scoped_refptr<URLRequestRedirectJob> redirect_job =
|
| @@ -6660,8 +6635,8 @@ TEST_F(URLRequestTestHTTP, NetworkSuspendTest) {
|
| context.Init();
|
|
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -6693,8 +6668,8 @@ TEST_F(URLRequestTestHTTP, NetworkSuspendTestNoCache) {
|
| context.Init();
|
|
|
| TestDelegate d;
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(
|
| - GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(GURL("http://127.0.0.1/"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -6735,8 +6710,7 @@ TEST_F(URLRequestInterceptorTestHTTP,
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - test_server()->GetURL("files/redirect-test.html"), DEFAULT_PRIORITY,
|
| - &d, nullptr));
|
| + test_server()->GetURL("files/redirect-test.html"), DEFAULT_PRIORITY, &d));
|
| req->Start();
|
| base::RunLoop().Run();
|
|
|
| @@ -6768,7 +6742,7 @@ TEST_F(URLRequestInterceptorTestHTTP,
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| test_server()->GetURL("files/two-content-lengths.html"), DEFAULT_PRIORITY,
|
| - &d, nullptr));
|
| + &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -6800,8 +6774,7 @@ TEST_F(URLRequestInterceptorTestHTTP,
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(default_context().CreateRequest(
|
| - test_server()->GetURL("files/simple.html"), DEFAULT_PRIORITY,
|
| - &d, nullptr));
|
| + test_server()->GetURL("files/simple.html"), DEFAULT_PRIORITY, &d));
|
| req->set_method("GET");
|
| req->Start();
|
| base::RunLoop().Run();
|
| @@ -6868,7 +6841,7 @@ class URLRequestTestReferrerPolicy : public URLRequestTest {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> req(
|
| - default_context_.CreateRequest(origin_url, DEFAULT_PRIORITY, &d, NULL));
|
| + default_context_.CreateRequest(origin_url, DEFAULT_PRIORITY, &d));
|
| req->set_referrer_policy(policy);
|
| req->SetReferrer(referrer.spec());
|
| req->Start();
|
| @@ -7057,7 +7030,7 @@ TEST_F(HTTPSRequestTest, HTTPSGetTest) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -7089,7 +7062,7 @@ TEST_F(HTTPSRequestTest, HTTPSMismatchedTest) {
|
| {
|
| d.set_allow_certificate_errors(err_allowed);
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7126,7 +7099,7 @@ TEST_F(HTTPSRequestTest, HTTPSExpiredTest) {
|
| {
|
| d.set_allow_certificate_errors(err_allowed);
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7175,8 +7148,8 @@ TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| GURL(base::StringPrintf("https://www.google.com:%d",
|
| - test_server.host_port_pair().port())),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.host_port_pair().port())),
|
| + DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7227,8 +7200,8 @@ TEST_F(HTTPSRequestTest, HTTPSErrorsNoClobberTSSTest) {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(context.CreateRequest(
|
| GURL(base::StringPrintf("https://www.google.com:%d",
|
| - test_server.host_port_pair().port())),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.host_port_pair().port())),
|
| + DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7301,8 +7274,8 @@ TEST_F(HTTPSRequestTest, HSTSPreservesPosts) {
|
|
|
| scoped_ptr<URLRequest> req(context.CreateRequest(
|
| GURL(base::StringPrintf("http://www.somewhere.com:%d/echo",
|
| - test_server.host_port_pair().port())),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.host_port_pair().port())),
|
| + DEFAULT_PRIORITY, &d));
|
| req->set_method("POST");
|
| req->set_upload(CreateSimpleUploadData(kData));
|
|
|
| @@ -7364,8 +7337,8 @@ TEST_F(HTTPSRequestTest, HSTSCrossOriginAddHeaders) {
|
| // Quit on redirect to allow response header inspection upon redirect.
|
| d.set_quit_on_redirect(true);
|
|
|
| - scoped_ptr<URLRequest> req(context.CreateRequest(hsts_http_url,
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> req(
|
| + context.CreateRequest(hsts_http_url, DEFAULT_PRIORITY, &d));
|
| // Set Origin header to simulate a cross-origin request.
|
| HttpRequestHeaders request_headers;
|
| request_headers.SetHeader("Origin", kOriginHeaderValue);
|
| @@ -7402,7 +7375,7 @@ TEST(WebSocketURLRequestTest, HSTSApplied) {
|
| GURL ws_url("ws://example.net/echo");
|
| TestDelegate delegate;
|
| scoped_ptr<URLRequest> request(
|
| - context.CreateRequest(ws_url, DEFAULT_PRIORITY, &delegate, NULL));
|
| + context.CreateRequest(ws_url, DEFAULT_PRIORITY, &delegate));
|
| EXPECT_TRUE(request->GetHSTSRedirect(&ws_url));
|
| EXPECT_TRUE(ws_url.SchemeIs("wss"));
|
| }
|
| @@ -7444,7 +7417,7 @@ TEST_F(HTTPSRequestTest, ClientAuthTest) {
|
| SSLClientAuthTestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7484,7 +7457,7 @@ TEST_F(HTTPSRequestTest, ResumeTest) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7500,7 +7473,7 @@ TEST_F(HTTPSRequestTest, ResumeTest) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7575,7 +7548,7 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7607,7 +7580,7 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -7657,7 +7630,7 @@ TEST_F(HTTPSRequestTest, DisableECDSAOnXP) {
|
|
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("client-cipher-list"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("client-cipher-list"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -7757,8 +7730,8 @@ class HTTPSFallbackTest : public testing::Test {
|
| base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
|
| ASSERT_TRUE(test_server.Start());
|
|
|
| - request_ = context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &delegate_, NULL);
|
| + request_ = context_.CreateRequest(test_server.GetURL(std::string()),
|
| + DEFAULT_PRIORITY, &delegate_);
|
| request_->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -7928,7 +7901,7 @@ TEST_F(HTTPSRequestTest, SSLv3FallbackNoCache) {
|
| context.set_fallback_min_version(SSL_PROTOCOL_VERSION_TLS1);
|
| context.Init();
|
| scoped_ptr<URLRequest> request(context.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &delegate, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &delegate));
|
| request->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -7947,11 +7920,8 @@ TEST_F(HTTPSRequestTest, SSLv3FallbackNoCache) {
|
| context.set_fallback_min_version(SSL_PROTOCOL_VERSION_SSL3);
|
|
|
| context.Init();
|
| - scoped_ptr<URLRequest> request(
|
| - context.CreateRequest(test_server.GetURL("ssl-session-cache"),
|
| - DEFAULT_PRIORITY,
|
| - &delegate,
|
| - NULL));
|
| + scoped_ptr<URLRequest> request(context.CreateRequest(
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &delegate));
|
| request->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -8022,7 +7992,7 @@ TEST_F(HTTPSSessionTest, DontResumeSessionsForInvalidCertificates) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -8041,7 +8011,7 @@ TEST_F(HTTPSSessionTest, DontResumeSessionsForInvalidCertificates) {
|
| {
|
| TestDelegate d;
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d));
|
|
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
| @@ -8123,7 +8093,7 @@ class HTTPSOCSPTest : public HTTPSRequestTest {
|
| TestDelegate d;
|
| d.set_allow_certificate_errors(true);
|
| scoped_ptr<URLRequest> r(context_.CreateRequest(
|
| - test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
|
|
| base::RunLoop().Run();
|
| @@ -8638,8 +8608,8 @@ TEST_F(URLRequestTestFTP, UnsafePort) {
|
|
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - url, DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(url, DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8658,7 +8628,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPDirectoryListing) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("/"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("/"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8685,7 +8655,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTestAnonymous) {
|
| TestDelegate d;
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, &d, NULL));
|
| + test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8716,7 +8686,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTest) {
|
| {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome", "chrome"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8752,7 +8722,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPassword) {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome",
|
| "wrong_password"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8783,7 +8753,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPasswordRestart) {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome",
|
| "wrong_password"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8808,10 +8778,10 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUser) {
|
| app_path = app_path.AppendASCII("LICENSE");
|
| TestDelegate d;
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURLWithUserAndPassword("/LICENSE", "wrong_user",
|
| - "chrome"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(test_server_.GetURLWithUserAndPassword(
|
| + "/LICENSE", "wrong_user", "chrome"),
|
| + DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8839,10 +8809,10 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUserRestart) {
|
| // the initial login with wrong credentials will fail.
|
| d.set_credentials(AuthCredentials(kChrome, kChrome));
|
| {
|
| - scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURLWithUserAndPassword("/LICENSE", "wrong_user",
|
| - "chrome"),
|
| - DEFAULT_PRIORITY, &d, NULL));
|
| + scoped_ptr<URLRequest> r(
|
| + default_context_.CreateRequest(test_server_.GetURLWithUserAndPassword(
|
| + "/LICENSE", "wrong_user", "chrome"),
|
| + DEFAULT_PRIORITY, &d));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8871,7 +8841,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) {
|
| // Pass correct login identity in the URL.
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome", "chrome"),
|
| - DEFAULT_PRIORITY, d.get(), NULL));
|
| + DEFAULT_PRIORITY, d.get()));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8890,7 +8860,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) {
|
| {
|
| // This request should use cached identity from previous request.
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, d.get(), NULL));
|
| + test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, d.get()));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8922,7 +8892,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) {
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome",
|
| "wrong_password"),
|
| - DEFAULT_PRIORITY, d.get(), NULL));
|
| + DEFAULT_PRIORITY, d.get()));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
| @@ -8944,7 +8914,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) {
|
| // Don't pass wrong credentials in the URL, they would override valid cached
|
| // ones.
|
| scoped_ptr<URLRequest> r(default_context_.CreateRequest(
|
| - test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, d.get(), NULL));
|
| + test_server_.GetURL("/LICENSE"), DEFAULT_PRIORITY, d.get()));
|
| r->Start();
|
| EXPECT_TRUE(r->is_pending());
|
|
|
|
|