diff options
Diffstat (limited to 'net/url_request/url_request_unittest.cc')
-rw-r--r-- | net/url_request/url_request_unittest.cc | 737 |
1 files changed, 490 insertions, 247 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 08aa1b15..daf4c57 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -37,6 +37,7 @@ #include "net/base/net_log_unittest.h" #include "net/base/net_module.h" #include "net/base/net_util.h" +#include "net/base/request_priority.h" #include "net/base/test_data_directory.h" #include "net/base/upload_bytes_element_reader.h" #include "net/base/upload_data_stream.h" @@ -621,7 +622,7 @@ class URLRequestTest : public PlatformTest { TEST_F(URLRequestTest, AboutBlankTest) { TestDelegate d; { - URLRequest r(GURL("about:blank"), &d, &default_context_); + URLRequest r(GURL("about:blank"), DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -643,7 +644,8 @@ TEST_F(URLRequestTest, DataURLImageTest) { TestDelegate d; { // Use our nice little Chrome logo. - URLRequest r(GURL( + URLRequest r( + GURL( "data:image/png;base64," "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADVklEQVQ4jX2TfUwUBBjG3" "w1y+HGcd9dxhXR8T4awOccJGgOSWclHImznLkTlSw0DDQXkrmgYgbUYnlQTqQxIEVxitD" @@ -663,6 +665,7 @@ TEST_F(URLRequestTest, DataURLImageTest) { "nlm2O34uI4b9tflqp1+QEFGzoW/ulmcofcpkZCYJhDfSpme7QcrHa+Xfji8paEQkTkSfm" "moRWRNZr/F1KfVMjW+IKEnv2FwZfKdzt0BQR6lClcZR0EfEXEfv/G6W9iLiIyCoReV5En" "hORIBHx+ufPj/gLB/zGI/G4Bk0AAAAASUVORK5CYII="), + DEFAULT_PRIORITY, &d, &default_context_); @@ -689,7 +692,7 @@ TEST_F(URLRequestTest, FileTest) { TestDelegate d; { - URLRequest r(app_url, &d, &default_context_); + URLRequest r(app_url, DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -718,7 +721,7 @@ TEST_F(URLRequestTest, FileTestCancel) { TestDelegate d; { - URLRequest r(app_url, &d, &default_context_); + URLRequest r(app_url, DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -750,7 +753,7 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) { TestDelegate d; { - URLRequest r(temp_url, &d, &default_context_); + URLRequest r(temp_url, DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kRange, @@ -794,7 +797,7 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) { TestDelegate d; { - URLRequest r(temp_url, &d, &default_context_); + URLRequest r(temp_url, DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kRange, @@ -831,7 +834,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) { TestDelegate d; { - URLRequest r(temp_url, &d, &default_context_); + URLRequest r(temp_url, DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kRange, @@ -850,7 +853,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) { TEST_F(URLRequestTest, InvalidUrlTest) { TestDelegate d; { - URLRequest r(GURL("invalid url"), &d, &default_context_); + URLRequest r(GURL("invalid url"), DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -887,7 +890,9 @@ TEST_F(URLRequestTest, ResolveShortcutTest) { TestDelegate d; { - URLRequest r(FilePathToFileURL(base::FilePath(lnk_path)), &d, + URLRequest r(FilePathToFileURL(base::FilePath(lnk_path)), + DEFAULT_PRIORITY, + &d, &default_context_); r.Start(); @@ -931,7 +936,8 @@ TEST_F(URLRequestTest, FileDirCancelTest) { file_path = file_path.Append(FILE_PATH_LITERAL("net")); file_path = file_path.Append(FILE_PATH_LITERAL("data")); - URLRequest req(FilePathToFileURL(file_path), &d, &default_context_); + URLRequest req( + FilePathToFileURL(file_path), DEFAULT_PRIORITY, &d, &default_context_); req.Start(); EXPECT_TRUE(req.is_pending()); @@ -957,7 +963,8 @@ TEST_F(URLRequestTest, FileDirOutputSanity) { path = path.Append(FILE_PATH_LITERAL("url_request_unittest")); TestDelegate d; - URLRequest req(FilePathToFileURL(path), &d, &default_context_); + URLRequest req( + FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -993,7 +1000,8 @@ TEST_F(URLRequestTest, FileDirRedirectNoCrash) { path = path.Append(FILE_PATH_LITERAL("url_request_unittest")); TestDelegate d; - URLRequest req(FilePathToFileURL(path), &d, &default_context_); + URLRequest req( + FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -1007,7 +1015,7 @@ TEST_F(URLRequestTest, FileDirRedirectNoCrash) { // Don't accept the url "file:///" on windows. See http://crbug.com/1474. TEST_F(URLRequestTest, FileDirRedirectSingleSlash) { TestDelegate d; - URLRequest req(GURL("file:///"), &d, &default_context_); + URLRequest req(GURL("file:///"), DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -1228,7 +1236,10 @@ TEST_F(URLRequestTest, Intercept) { interceptor.main_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); 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(); @@ -1269,7 +1280,10 @@ TEST_F(URLRequestTest, InterceptRedirect) { interceptor.redirect_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1302,7 +1316,10 @@ TEST_F(URLRequestTest, InterceptServerError) { interceptor.final_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1331,7 +1348,10 @@ TEST_F(URLRequestTest, InterceptNetworkError) { interceptor.final_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1360,7 +1380,10 @@ TEST_F(URLRequestTest, InterceptRestartRequired) { interceptor.main_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1391,7 +1414,10 @@ TEST_F(URLRequestTest, InterceptRespectsCancelMain) { interceptor.final_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1422,7 +1448,10 @@ TEST_F(URLRequestTest, InterceptRespectsCancelRedirect) { interceptor.final_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1447,7 +1476,10 @@ TEST_F(URLRequestTest, InterceptRespectsCancelFinal) { interceptor.cancel_final_request_ = true; TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1473,7 +1505,10 @@ TEST_F(URLRequestTest, InterceptRespectsCancelInRestart) { interceptor.final_data_ = TestInterceptor::ok_data(); TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("GET"); req.Start(); base::RunLoop().Run(); @@ -1493,7 +1528,8 @@ LoadTimingInfo RunLoadTimingTest(const LoadTimingInfo& job_load_timing, interceptor.intercept_main_request_ = true; interceptor.main_request_load_timing_info_ = job_load_timing; TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, context); + URLRequest req( + GURL("http://test_intercept/foo"), DEFAULT_PRIORITY, &d, context); req.Start(); base::RunLoop().Run(); @@ -1567,8 +1603,8 @@ TEST_F(URLRequestTest, InterceptLoadTiming) { LoadTimingInfo job_load_timing = NormalLoadTimingInfo(now, CONNECT_TIMING_HAS_DNS_TIMES, false); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Nothing should have been changed by the URLRequest. EXPECT_EQ(job_load_timing.proxy_resolve_start, @@ -1598,8 +1634,8 @@ TEST_F(URLRequestTest, InterceptLoadTimingProxy) { LoadTimingInfo job_load_timing = NormalLoadTimingInfo(now, CONNECT_TIMING_HAS_SSL_TIMES, true); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Nothing should have been changed by the URLRequest. EXPECT_EQ(job_load_timing.proxy_resolve_start, @@ -1643,8 +1679,8 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyProxyResolution) { job_load_timing.connect_timing.connect_end = now - base::TimeDelta::FromDays(1); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Proxy times, connect times, and DNS times should all be replaced with // request_start. @@ -1673,8 +1709,8 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyProxyResolutionReused) { job_load_timing.proxy_resolve_start = now - base::TimeDelta::FromDays(4); job_load_timing.proxy_resolve_end = now - base::TimeDelta::FromDays(3); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Proxy times and connect times should all be replaced with request_start. EXPECT_EQ(load_timing_result.request_start, @@ -1702,8 +1738,8 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyConnect) { job_load_timing.connect_timing.connect_end = now - base::TimeDelta::FromDays(4); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Connect times, and SSL times should be replaced with request_start. EXPECT_EQ(load_timing_result.request_start, @@ -1734,8 +1770,8 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyConnectWithProxy) { job_load_timing.connect_timing.connect_end = now - base::TimeDelta::FromDays(2); - LoadTimingInfo load_timing_result = RunLoadTimingTest(job_load_timing, - &default_context_); + LoadTimingInfo load_timing_result = + RunLoadTimingTest(job_load_timing, &default_context_); // Connect times should be replaced with proxy_resolve_end. EXPECT_EQ(load_timing_result.proxy_resolve_end, @@ -1752,8 +1788,10 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyConnectWithProxy) { TEST_F(URLRequestTest, Identifiers) { TestDelegate d; TestURLRequestContext context; - TestURLRequest req(GURL("http://example.com"), &d, &context, NULL); - TestURLRequest other_req(GURL("http://example.com"), &d, &context, NULL); + TestURLRequest req( + GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context); + TestURLRequest other_req( + GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context); ASSERT_NE(req.identifier(), other_req.identifier()); } @@ -1768,7 +1806,7 @@ TEST_F(URLRequestTest, NetworkDelegateProxyError) { TestURLRequestContextWithProxy context("myproxy:70", &network_delegate); TestDelegate d; - URLRequest req(GURL("http://example.com"), &d, &context); + URLRequest req(GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context); req.set_method("GET"); req.Start(); @@ -1788,7 +1826,7 @@ TEST_F(URLRequestTest, NetworkDelegateProxyError) { // content is empty. TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) { TestDelegate d; - URLRequest req(GURL("data:,"), &d, &default_context_); + URLRequest req(GURL("data:,"), DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); EXPECT_EQ("", d.data_received()); @@ -1799,7 +1837,10 @@ TEST_F(URLRequestTest, RequestCompletionForEmptyResponse) { // correctly, both before and after start. TEST_F(URLRequestTest, SetPriorityBasic) { TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); EXPECT_EQ(DEFAULT_PRIORITY, req.priority()); req.SetPriority(LOW); @@ -1816,7 +1857,10 @@ TEST_F(URLRequestTest, SetPriorityBasic) { // Start on it. TEST_F(URLRequestTest, SetJobPriorityBeforeJobStart) { TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); EXPECT_EQ(DEFAULT_PRIORITY, req.priority()); scoped_refptr<URLRequestTestJob> job = @@ -1834,7 +1878,10 @@ TEST_F(URLRequestTest, SetJobPriorityBeforeJobStart) { // job. TEST_F(URLRequestTest, SetJobPriority) { TestDelegate d; - URLRequest req(GURL("http://test_intercept/foo"), &d, &default_context_); + URLRequest req(GURL("http://test_intercept/foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); scoped_refptr<URLRequestTestJob> job = new URLRequestTestJob(&req, &default_network_delegate_); @@ -1881,8 +1928,10 @@ TEST_F(URLRequestTest, DelayedCookieCallback) { TestNetworkDelegate network_delegate; context.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("set-cookie?CookieToNotSend=1"), &d, &context); + URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), + DEFAULT_PRIORITY, + &d, + &context); req.Start(); base::RunLoop().Run(); EXPECT_EQ(0, network_delegate.blocked_get_cookies_count()); @@ -1895,7 +1944,10 @@ TEST_F(URLRequestTest, DelayedCookieCallback) { TestNetworkDelegate network_delegate; context.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req(test_server.GetURL("echoheader?Cookie"), &d, &context); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &context); req.Start(); base::RunLoop().Run(); @@ -1916,6 +1968,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -1929,8 +1982,10 @@ TEST_F(URLRequestTest, DoNotSendCookies) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -1945,8 +2000,10 @@ TEST_F(URLRequestTest, DoNotSendCookies) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_load_flags(LOAD_DO_NOT_SEND_COOKIES); req.Start(); base::RunLoop().Run(); @@ -1970,6 +2027,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -1987,6 +2045,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) { TestDelegate d; URLRequest req( test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.set_load_flags(LOAD_DO_NOT_SAVE_COOKIES); @@ -2005,8 +2064,10 @@ TEST_F(URLRequestTest, DoNotSaveCookies) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2031,6 +2092,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2045,8 +2107,10 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2063,8 +2127,10 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES); - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2086,6 +2152,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2103,6 +2170,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) { network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE); URLRequest req( test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2118,8 +2186,10 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2142,7 +2212,10 @@ TEST_F(URLRequestTest, DoNotSaveEmptyCookies) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req(test_server.GetURL("set-cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("set-cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2162,6 +2235,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2176,8 +2250,10 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2194,8 +2270,10 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; network_delegate.set_cookie_options(TestNetworkDelegate::NO_GET_COOKIES); - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2217,6 +2295,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) { default_context_.set_network_delegate(&network_delegate); TestDelegate d; URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2234,6 +2313,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) { network_delegate.set_cookie_options(TestNetworkDelegate::NO_SET_COOKIE); URLRequest req( test_server.GetURL("set-cookie?CookieToNotSave=1&CookieToNotUpdate=1"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2249,8 +2329,10 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2316,8 +2398,10 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req(test_server.GetURL( - "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"), + URLRequest req( + test_server.GetURL( + "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2328,8 +2412,10 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2340,8 +2426,10 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) { FixedDateNetworkDelegate network_delegate("18-Apr-1977 22:49:13 UTC"); default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req(test_server.GetURL( - "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"), + URLRequest req( + test_server.GetURL( + "set-cookie?StillGood=1;expires=Mon,18-Apr-1977,22:50:13,GMT"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -2352,8 +2440,10 @@ TEST_F(URLRequestTest, AcceptClockSkewCookieWithWrongDateTimezone) { TestNetworkDelegate network_delegate; default_context_.set_network_delegate(&network_delegate); TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Cookie"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Cookie"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -2372,8 +2462,10 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) { // only the latter shall be respected. { TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Referer"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Referer"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.SetReferrer("http://foo.com/"); HttpRequestHeaders headers; @@ -2390,8 +2482,10 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) { // shall be sent in the header. { TestDelegate d; - URLRequest req( - test_server.GetURL("echoheader?Referer"), &d, &default_context_); + URLRequest req(test_server.GetURL("echoheader?Referer"), + DEFAULT_PRIORITY, + &d, + &default_context_); HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kReferer, "http://bar.com/"); @@ -2426,7 +2520,7 @@ class URLRequestTestHTTP : public URLRequestTest { bool include_data) { static const char kData[] = "hello world"; TestDelegate d; - URLRequest req(redirect_url, &d, &default_context_); + URLRequest req(redirect_url, DEFAULT_PRIORITY, &d, &default_context_); req.set_method(request_method); if (include_data) { req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); @@ -2471,7 +2565,8 @@ class URLRequestTestHTTP : public URLRequestTest { for (int i = 0; i < kIterations; ++i) { TestDelegate d; - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.set_method(method.c_str()); r.set_upload(make_scoped_ptr(CreateSimpleUploadData(uploadBytes))); @@ -2519,8 +2614,9 @@ class URLRequestTestHTTP : public URLRequestTest { TestDelegate d; URLRequest r(test_server_.GetURL("set-many-cookies?" + base::IntToString(num_cookies)), - &d, - &default_context_); + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -2555,12 +2651,12 @@ TEST_F(URLRequestTestHTTP, ProxyTunnelRedirectTest) { TestNetworkDelegate network_delegate; // Must outlive URLRequest. TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); TestDelegate d; { - URLRequest r(GURL("https://www.redirect.com/"), &d, &context); + URLRequest r( + GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d, &context); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -2581,12 +2677,12 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateTunnelConnectionFailed) { TestNetworkDelegate network_delegate; // Must outlive URLRequest. TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); TestDelegate d; { - URLRequest r(GURL("https://www.redirect.com/"), &d, &context); + URLRequest r( + GURL("https://www.redirect.com/"), DEFAULT_PRIORITY, &d, &context); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -2627,7 +2723,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateBlockAsynchronously) { context.Init(); { - URLRequest r(test_server_.GetURL("empty.html"), &d, &context); + URLRequest r( + test_server_.GetURL("empty.html"), DEFAULT_PRIORITY, &d, &context); r.Start(); for (size_t i = 0; i < blocking_stages_length; ++i) { @@ -2656,11 +2753,11 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelRequest) { network_delegate.set_retval(ERR_EMPTY_RESPONSE); TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); { - URLRequest r(test_server_.GetURL(std::string()), &d, &context); + URLRequest r( + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2690,7 +2787,7 @@ void NetworkDelegateCancelRequest(BlockingNetworkDelegate::BlockMode block_mode, context.Init(); { - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2762,12 +2859,11 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequest) { network_delegate.set_redirect_url(redirect_url); TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); { GURL original_url(test_server_.GetURL("empty.html")); - URLRequest r(original_url, &d, &context); + URLRequest r(original_url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2795,12 +2891,11 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestSynchronously) { network_delegate.set_redirect_url(redirect_url); TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); { GURL original_url(test_server_.GetURL("empty.html")); - URLRequest r(original_url, &d, &context); + URLRequest r(original_url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2835,7 +2930,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequestPost) { { GURL original_url(test_server_.GetURL("empty.html")); - URLRequest r(original_url, &d, &context); + URLRequest r(original_url, DEFAULT_PRIORITY, &d, &context); r.set_method("POST"); r.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); HttpRequestHeaders headers; @@ -2877,7 +2972,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncNoAction) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2908,7 +3003,7 @@ TEST_F(URLRequestTestHTTP, { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); { @@ -2949,7 +3044,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncSetAuth) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -2984,7 +3079,7 @@ TEST_F(URLRequestTestHTTP, { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3022,7 +3117,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredSyncCancel) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3056,7 +3151,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncNoAction) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3091,7 +3186,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncSetAuth) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3124,7 +3219,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateOnAuthRequiredAsyncCancel) { { GURL url(test_server_.GetURL("auth-basic")); - URLRequest r(url, &d, &context); + URLRequest r(url, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3154,7 +3249,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting1) { context.Init(); { - URLRequest r(test_server_.GetURL(std::string()), &d, &context); + URLRequest r( + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3190,7 +3286,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting2) { context.Init(); { - URLRequest r(test_server_.GetURL(std::string()), &d, &context); + URLRequest r( + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3225,7 +3322,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting3) { context.Init(); { - URLRequest r(test_server_.GetURL(std::string()), &d, &context); + URLRequest r( + test_server_.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3260,7 +3358,8 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateCancelWhileWaiting4) { context.Init(); { - URLRequest r(test_server_.GetURL("auth-basic"), &d, &context); + URLRequest r( + test_server_.GetURL("auth-basic"), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -3287,12 +3386,12 @@ TEST_F(URLRequestTestHTTP, UnexpectedServerAuthTest) { TestNetworkDelegate network_delegate; // Must outlive URLRequest. TestURLRequestContextWithProxy context( - test_server_.host_port_pair().ToString(), - &network_delegate); + test_server_.host_port_pair().ToString(), &network_delegate); TestDelegate d; { - URLRequest r(GURL("https://www.server-auth.com/"), &d, &context); + URLRequest r( + GURL("https://www.server-auth.com/"), DEFAULT_PRIORITY, &d, &context); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -3309,7 +3408,10 @@ TEST_F(URLRequestTestHTTP, GetTest_NoCache) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -3375,7 +3477,10 @@ TEST_F(URLRequestTestHTTP, GetTest) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -3398,7 +3503,7 @@ TEST_F(URLRequestTestHTTP, GetTest_GetFullRequestHeaders) { TestDelegate d; { GURL test_url(test_server_.GetURL(std::string())); - URLRequest r(test_url, &d, &default_context_); + URLRequest r(test_url, DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; EXPECT_FALSE(r.GetFullRequestHeaders(&headers)); @@ -3426,7 +3531,10 @@ TEST_F(URLRequestTestHTTP, GetTestLoadTiming) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -3476,7 +3584,8 @@ TEST_F(URLRequestTestHTTP, GetZippedTest) { context.set_network_delegate(&network_delegate); context.Init(); - URLRequest r(test_server_.GetURL(test_file), &d, &context); + URLRequest r( + test_server_.GetURL(test_file), DEFAULT_PRIORITY, &d, &context); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -3512,8 +3621,11 @@ TEST_F(URLRequestTestHTTP, HTTPSToHTTPRedirectNoRefererTest) { // server should not be sent the referer. GURL http_destination = test_server_.GetURL(std::string()); TestDelegate d; - URLRequest req(https_test_server.GetURL( - "server-redirect?" + http_destination.spec()), &d, &default_context_); + URLRequest req( + https_test_server.GetURL("server-redirect?" + http_destination.spec()), + DEFAULT_PRIORITY, + &d, + &default_context_); req.SetReferrer("https://www.referrer.com/"); req.Start(); base::RunLoop().Run(); @@ -3531,7 +3643,7 @@ TEST_F(URLRequestTestHTTP, RedirectLoadTiming) { GURL original_url = test_server_.GetURL("server-redirect?" + destination_url.spec()); TestDelegate d; - URLRequest req(original_url, &d, &default_context_); + URLRequest req(original_url, DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -3571,7 +3683,7 @@ TEST_F(URLRequestTestHTTP, MultipleRedirectTest) { GURL original_url = test_server_.GetURL( "server-redirect?" + middle_redirect_url.spec()); TestDelegate d; - URLRequest req(original_url, &d, &default_context_); + URLRequest req(original_url, DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -3887,7 +3999,9 @@ TEST_F(URLRequestTestHTTP, DelegateInfoBeforeStart) { { URLRequest r(test_server_.GetURL("empty.html"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); EXPECT_EQ(LOAD_STATE_IDLE, load_state.state); EXPECT_EQ(string16(), load_state.param); @@ -3933,7 +4047,9 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfo) { { URLRequest r(test_server_.GetURL("simple.html"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); EXPECT_EQ(LOAD_STATE_IDLE, load_state.state); EXPECT_EQ(string16(), load_state.param); @@ -3984,7 +4100,9 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoRedirect) { { URLRequest r(test_server_.GetURL("server-redirect?simple.html"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); EXPECT_EQ(LOAD_STATE_IDLE, load_state.state); EXPECT_EQ(string16(), load_state.param); @@ -4060,7 +4178,9 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoAuth) { { URLRequest r(test_server_.GetURL("auth-basic"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); EXPECT_EQ(LOAD_STATE_IDLE, load_state.state); EXPECT_EQ(string16(), load_state.param); @@ -4118,7 +4238,9 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfo) { // the possability of multiple reads being combined in the unlikely event // that it occurs. URLRequest r(test_server_.GetURL("chunked?waitBetweenChunks=20"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); r.Start(); base::RunLoop().Run(); @@ -4166,7 +4288,9 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfoOnRedirect) { { URLRequest r(test_server_.GetURL("server-redirect?simple.html"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); r.Start(); base::RunLoop().Run(); @@ -4224,7 +4348,9 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateOnRedirectCancelled) { { URLRequest r(test_server_.GetURL("server-redirect?simple.html"), - &request_delegate, &context); + DEFAULT_PRIORITY, + &request_delegate, + &context); LoadStateWithParam load_state = r.GetLoadState(); r.Start(); base::RunLoop().Run(); @@ -4285,7 +4411,7 @@ TEST_F(URLRequestTestHTTP, RedirectWithAdditionalHeadersTest) { GURL original_url = test_server_.GetURL( "server-redirect?" + destination_url.spec()); RedirectWithAdditionalHeadersDelegate d; - URLRequest req(original_url, &d, &default_context_); + URLRequest req(original_url, DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -4321,7 +4447,7 @@ TEST_F(URLRequestTestHTTP, RedirectWithHeaderRemovalTest) { GURL original_url = test_server_.GetURL( "server-redirect?" + destination_url.spec()); RedirectWithHeaderRemovalDelegate d; - URLRequest req(original_url, &d, &default_context_); + URLRequest req(original_url, DEFAULT_PRIORITY, &d, &default_context_); req.SetExtraRequestHeaderByName(kExtraHeaderToRemove, "dummy", false); req.Start(); base::RunLoop().Run(); @@ -4337,7 +4463,10 @@ TEST_F(URLRequestTestHTTP, RedirectWithHeaderRemovalTest) { TEST_F(URLRequestTestHTTP, CancelTest) { TestDelegate d; { - URLRequest r(GURL("http://www.google.com/"), &d, &default_context_); + URLRequest r(GURL("http://www.google.com/"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -4359,7 +4488,10 @@ TEST_F(URLRequestTestHTTP, CancelTest2) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); d.set_cancel_in_response_started(true); @@ -4380,7 +4512,10 @@ TEST_F(URLRequestTestHTTP, CancelTest3) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); d.set_cancel_in_received_data(true); @@ -4404,7 +4539,10 @@ TEST_F(URLRequestTestHTTP, CancelTest4) { TestDelegate d; { - URLRequest r(test_server_.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server_.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -4430,7 +4568,10 @@ TEST_F(URLRequestTestHTTP, CancelTest5) { // populate cache { TestDelegate d; - URLRequest r(test_server_.GetURL("cachetime"), &d, &default_context_); + URLRequest r(test_server_.GetURL("cachetime"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); base::RunLoop().Run(); EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status()); @@ -4439,7 +4580,10 @@ TEST_F(URLRequestTestHTTP, CancelTest5) { // cancel read from cache (see bug 990242) { TestDelegate d; - URLRequest r(test_server_.GetURL("cachetime"), &d, &default_context_); + URLRequest r(test_server_.GetURL("cachetime"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); r.Cancel(); base::RunLoop().Run(); @@ -4466,7 +4610,8 @@ TEST_F(URLRequestTestHTTP, PostEmptyTest) { TestDelegate d; { - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.set_method("POST"); r.Start(); @@ -4488,7 +4633,8 @@ TEST_F(URLRequestTestHTTP, PostFileTest) { TestDelegate d; { - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.set_method("POST"); base::FilePath dir; @@ -4548,7 +4694,8 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataBeforeStart) { TestDelegate d; { - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.EnableChunkedUpload(); r.set_method("POST"); AddChunksToUpload(&r); @@ -4566,7 +4713,8 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataJustAfterStart) { TestDelegate d; { - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.EnableChunkedUpload(); r.set_method("POST"); r.Start(); @@ -4583,7 +4731,8 @@ TEST_F(URLRequestTestHTTP, TestPostChunkedDataAfterStart) { TestDelegate d; { - URLRequest r(test_server_.GetURL("echo"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); r.EnableChunkedUpload(); r.set_method("POST"); r.Start(); @@ -4601,8 +4750,10 @@ TEST_F(URLRequestTestHTTP, ResponseHeadersTest) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req( - test_server_.GetURL("files/with-headers.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/with-headers.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -4635,10 +4786,10 @@ TEST_F(URLRequestTestHTTP, ProcessSTS) { ASSERT_TRUE(https_test_server.Start()); TestDelegate d; - URLRequest request( - https_test_server.GetURL("files/hsts-headers.html"), - &d, - &default_context_); + URLRequest request(https_test_server.GetURL("files/hsts-headers.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); request.Start(); base::RunLoop().Run(); @@ -4679,10 +4830,10 @@ TEST_F(URLRequestTestHTTP, MAYBE_ProcessPKP) { ASSERT_TRUE(https_test_server.Start()); TestDelegate d; - URLRequest request( - https_test_server.GetURL("files/hpkp-headers.html"), - &d, - &default_context_); + URLRequest request(https_test_server.GetURL("files/hpkp-headers.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); request.Start(); base::RunLoop().Run(); @@ -4712,6 +4863,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSOnce) { TestDelegate d; URLRequest request( https_test_server.GetURL("files/hsts-multiple-headers.html"), + DEFAULT_PRIORITY, &d, &default_context_); request.Start(); @@ -4741,6 +4893,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSAndPKP) { TestDelegate d; URLRequest request( https_test_server.GetURL("files/hsts-and-hpkp-headers.html"), + DEFAULT_PRIORITY, &d, &default_context_); request.Start(); @@ -4783,6 +4936,7 @@ TEST_F(URLRequestTestHTTP, ProcessSTSAndPKP2) { TestDelegate d; URLRequest request( https_test_server.GetURL("files/hsts-and-hpkp-headers2.html"), + DEFAULT_PRIORITY, &d, &default_context_); request.Start(); @@ -4812,8 +4966,10 @@ TEST_F(URLRequestTestHTTP, ContentTypeNormalizationTest) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req(test_server_.GetURL( - "files/content-type-normalization.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/content-type-normalization.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -4845,8 +5001,10 @@ TEST_F(URLRequestTestHTTP, RestrictFileRedirects) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req(test_server_.GetURL( - "files/redirect-to-file.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-to-file.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -4858,8 +5016,10 @@ TEST_F(URLRequestTestHTTP, RestrictDataRedirects) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req(test_server_.GetURL( - "files/redirect-to-data.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-to-data.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::MessageLoop::current()->Run(); @@ -4871,8 +5031,10 @@ TEST_F(URLRequestTestHTTP, RedirectToInvalidURL) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req(test_server_.GetURL( - "files/redirect-to-invalid-url.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-to-invalid-url.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -4884,8 +5046,10 @@ TEST_F(URLRequestTestHTTP, NoUserPassInReferrer) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheader?Referer"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheader?Referer"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.SetReferrer("http://user:pass@foo.com/"); req.Start(); base::RunLoop().Run(); @@ -4897,8 +5061,10 @@ TEST_F(URLRequestTestHTTP, NoFragmentInReferrer) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheader?Referer"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheader?Referer"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.SetReferrer("http://foo.com/test#fragment"); req.Start(); base::RunLoop().Run(); @@ -4910,8 +5076,10 @@ TEST_F(URLRequestTestHTTP, EmptyReferrerAfterValidReferrer) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheader?Referer"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheader?Referer"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.SetReferrer("http://foo.com/test#fragment"); req.SetReferrer(""); req.Start(); @@ -4926,8 +5094,10 @@ TEST_F(URLRequestTestHTTP, CancelRedirect) { TestDelegate d; { d.set_cancel_in_received_redirect(true); - URLRequest req( - test_server_.GetURL("files/redirect-test.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-test.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -4945,7 +5115,7 @@ TEST_F(URLRequestTestHTTP, DeferredRedirect) { { d.set_quit_on_redirect(true); GURL test_url(test_server_.GetURL("files/redirect-test.html")); - URLRequest req(test_url, &d, &default_context_); + URLRequest req(test_url, DEFAULT_PRIORITY, &d, &default_context_); req.Start(); base::RunLoop().Run(); @@ -4979,7 +5149,7 @@ TEST_F(URLRequestTestHTTP, DeferredRedirect_GetFullRequestHeaders) { { d.set_quit_on_redirect(true); GURL test_url(test_server_.GetURL("files/redirect-test.html")); - URLRequest req(test_url, &d, &default_context_); + URLRequest req(test_url, DEFAULT_PRIORITY, &d, &default_context_); EXPECT_FALSE(d.have_full_request_headers()); @@ -5020,8 +5190,10 @@ TEST_F(URLRequestTestHTTP, CancelDeferredRedirect) { TestDelegate d; { d.set_quit_on_redirect(true); - URLRequest req( - test_server_.GetURL("files/redirect-test.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-test.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.Start(); base::RunLoop().Run(); @@ -5043,8 +5215,10 @@ TEST_F(URLRequestTestHTTP, VaryHeader) { // Populate the cache. { TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheadercache?foo"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheadercache?foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); HttpRequestHeaders headers; headers.SetHeader("foo", "1"); req.SetExtraRequestHeaders(headers); @@ -5059,8 +5233,10 @@ TEST_F(URLRequestTestHTTP, VaryHeader) { // Expect a cache hit. { TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheadercache?foo"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheadercache?foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); HttpRequestHeaders headers; headers.SetHeader("foo", "1"); req.SetExtraRequestHeaders(headers); @@ -5077,8 +5253,10 @@ TEST_F(URLRequestTestHTTP, VaryHeader) { // Expect a cache miss. { TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheadercache?foo"), &d, &default_context_); + URLRequest req(test_server_.GetURL("echoheadercache?foo"), + DEFAULT_PRIORITY, + &d, + &default_context_); HttpRequestHeaders headers; headers.SetHeader("foo", "2"); req.SetExtraRequestHeaders(headers); @@ -5101,7 +5279,10 @@ TEST_F(URLRequestTestHTTP, BasicAuth) { TestDelegate d; d.set_credentials(AuthCredentials(kUser, kSecret)); - URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_); + URLRequest r(test_server_.GetURL("auth-basic"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); base::RunLoop().Run(); @@ -5116,7 +5297,10 @@ TEST_F(URLRequestTestHTTP, BasicAuth) { TestDelegate d; d.set_credentials(AuthCredentials(kUser, kSecret)); - URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_); + URLRequest r(test_server_.GetURL("auth-basic"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.set_load_flags(LOAD_VALIDATE_CACHE); r.Start(); @@ -5148,7 +5332,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) { TestDelegate d; d.set_credentials(AuthCredentials(kUser, kSecret)); - URLRequest r(url_requiring_auth, &d, &context); + URLRequest r(url_requiring_auth, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -5177,7 +5361,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) { replacements.SetPasswordStr(password); GURL url_with_identity = url_requiring_auth.ReplaceComponents(replacements); - URLRequest r(url_with_identity, &d, &context); + URLRequest r(url_with_identity, DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -5199,7 +5383,10 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) { TestDelegate d; d.set_credentials(AuthCredentials(kUser, kSecret)); - URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_); + URLRequest r(test_server_.GetURL("auth-basic"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); base::RunLoop().Run(); @@ -5230,7 +5417,10 @@ TEST_F(URLRequestTestHTTP, BasicAuthLoadTiming) { TestDelegate d; d.set_credentials(AuthCredentials(kUser, kSecret)); - URLRequest r(test_server_.GetURL("auth-basic"), &d, &default_context_); + URLRequest r(test_server_.GetURL("auth-basic"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.set_load_flags(LOAD_VALIDATE_CACHE); r.Start(); @@ -5259,8 +5449,10 @@ TEST_F(URLRequestTestHTTP, Post302RedirectGet) { const char kData[] = "hello world"; TestDelegate d; - URLRequest req( - test_server_.GetURL("files/redirect-to-echoall"), &d, &default_context_); + URLRequest req(test_server_.GetURL("files/redirect-to-echoall"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("POST"); req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); @@ -5346,7 +5538,10 @@ TEST_F(URLRequestTestHTTP, InterceptPost302RedirectGet) { const char kData[] = "hello world"; TestDelegate d; - URLRequest req(test_server_.GetURL("empty.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("empty.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("POST"); req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); HttpRequestHeaders headers; @@ -5370,7 +5565,10 @@ TEST_F(URLRequestTestHTTP, InterceptPost307RedirectPost) { const char kData[] = "hello world"; TestDelegate d; - URLRequest req(test_server_.GetURL("empty.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("empty.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); req.set_method("POST"); req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); HttpRequestHeaders headers; @@ -5401,8 +5599,10 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptLanguage) { context.Init(); TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheader?Accept-Language"), &d, &context); + URLRequest req(test_server_.GetURL("echoheader?Accept-Language"), + DEFAULT_PRIORITY, + &d, + &context); req.Start(); base::RunLoop().Run(); EXPECT_EQ("en", d.data_received()); @@ -5422,8 +5622,10 @@ TEST_F(URLRequestTestHTTP, EmptyAcceptLanguage) { context.set_http_user_agent_settings(&settings); TestDelegate d; - URLRequest req( - test_server_.GetURL("echoheader?Accept-Language"), &d, &context); + URLRequest req(test_server_.GetURL("echoheader?Accept-Language"), + DEFAULT_PRIORITY, + &d, + &context); req.Start(); base::RunLoop().Run(); EXPECT_EQ("None", d.data_received()); @@ -5436,6 +5638,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptLanguage) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?Accept-Language"), + DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; @@ -5452,6 +5655,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptEncoding) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?Accept-Encoding"), + DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; @@ -5468,6 +5672,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptEncoding) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?Accept-Encoding"), + DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; @@ -5485,6 +5690,7 @@ TEST_F(URLRequestTestHTTP, SetAcceptCharset) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?Accept-Charset"), + DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; @@ -5501,6 +5707,7 @@ TEST_F(URLRequestTestHTTP, DefaultUserAgent) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?User-Agent"), + DEFAULT_PRIORITY, &d, &default_context_); req.Start(); @@ -5515,6 +5722,7 @@ TEST_F(URLRequestTestHTTP, OverrideUserAgent) { TestDelegate d; URLRequest req(test_server_.GetURL("echoheader?User-Agent"), + DEFAULT_PRIORITY, &d, &default_context_); HttpRequestHeaders headers; @@ -5551,7 +5759,8 @@ TEST_F(URLRequestTestHTTP, EmptyHttpUserAgentSettings) { for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); i++) { TestDelegate d; - URLRequest req(test_server_.GetURL(tests[i].request), &d, &context); + URLRequest req( + test_server_.GetURL(tests[i].request), DEFAULT_PRIORITY, &d, &context); req.Start(); base::RunLoop().Run(); EXPECT_EQ(tests[i].expected_response, d.data_received()) @@ -5565,7 +5774,10 @@ TEST_F(URLRequestTestHTTP, SetSubsequentJobPriority) { ASSERT_TRUE(test_server_.Start()); TestDelegate d; - URLRequest req(test_server_.GetURL("empty.html"), &d, &default_context_); + URLRequest req(test_server_.GetURL("empty.html"), + DEFAULT_PRIORITY, + &d, + &default_context_); EXPECT_EQ(DEFAULT_PRIORITY, req.priority()); scoped_refptr<URLRequestRedirectJob> redirect_job = @@ -5609,7 +5821,10 @@ TEST_F(HTTPSRequestTest, HTTPSGetTest) { TestDelegate d; { - URLRequest r(test_server.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -5640,7 +5855,10 @@ TEST_F(HTTPSRequestTest, HTTPSMismatchedTest) { TestDelegate d; { d.set_allow_certificate_errors(err_allowed); - URLRequest r(test_server.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -5676,7 +5894,10 @@ TEST_F(HTTPSRequestTest, HTTPSExpiredTest) { TestDelegate d; { d.set_allow_certificate_errors(err_allowed); - URLRequest r(test_server.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -5721,7 +5942,8 @@ TEST_F(HTTPSRequestTest, TLSv1Fallback) { TestURLRequestContext context(true); context.Init(); d.set_allow_certificate_errors(true); - URLRequest r(test_server.GetURL(std::string()), &d, &context); + URLRequest r( + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -5762,6 +5984,7 @@ TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) { TestDelegate d; URLRequest r(GURL(base::StringPrintf("https://www.google.com:%d", test_server.host_port_pair().port())), + DEFAULT_PRIORITY, &d, &context); @@ -5810,6 +6033,7 @@ TEST_F(HTTPSRequestTest, HTTPSErrorsNoClobberTSSTest) { TestDelegate d; URLRequest r(GURL(base::StringPrintf("https://www.google.com:%d", test_server.host_port_pair().port())), + DEFAULT_PRIORITY, &d, &context); @@ -5881,6 +6105,7 @@ TEST_F(HTTPSRequestTest, HSTSPreservesPosts) { URLRequest req(GURL(base::StringPrintf("http://www.somewhere.com:%d/echo", test_server.host_port_pair().port())), + DEFAULT_PRIORITY, &d, &context); req.set_method("POST"); @@ -5914,7 +6139,8 @@ TEST_F(HTTPSRequestTest, SSLv3Fallback) { TestURLRequestContext context(true); context.Init(); d.set_allow_certificate_errors(true); - URLRequest r(test_server.GetURL(std::string()), &d, &context); + URLRequest r( + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context); r.Start(); base::RunLoop().Run(); @@ -5963,7 +6189,10 @@ TEST_F(HTTPSRequestTest, ClientAuthTest) { SSLClientAuthTestDelegate d; { - URLRequest r(test_server.GetURL(std::string()), &d, &default_context_); + URLRequest r(test_server.GetURL(std::string()), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6002,8 +6231,10 @@ TEST_F(HTTPSRequestTest, ResumeTest) { { TestDelegate d; - URLRequest r( - test_server.GetURL("ssl-session-cache"), &d, &default_context_); + URLRequest r(test_server.GetURL("ssl-session-cache"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6018,8 +6249,10 @@ TEST_F(HTTPSRequestTest, ResumeTest) { { TestDelegate d; - URLRequest r( - test_server.GetURL("ssl-session-cache"), &d, &default_context_); + URLRequest r(test_server.GetURL("ssl-session-cache"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6071,8 +6304,10 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) { { TestDelegate d; - URLRequest r( - test_server.GetURL("ssl-session-cache"), &d, &default_context_); + URLRequest r(test_server.GetURL("ssl-session-cache"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6103,8 +6338,10 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) { { TestDelegate d; - URLRequest r( - test_server.GetURL("ssl-session-cache"), &d, &default_context_); + URLRequest r(test_server.GetURL("ssl-session-cache"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6222,7 +6459,8 @@ class HTTPSOCSPTest : public HTTPSRequestTest { TestDelegate d; d.set_allow_certificate_errors(true); - URLRequest r(test_server.GetURL(std::string()), &d, &context_); + URLRequest r( + test_server.GetURL(std::string()), DEFAULT_PRIORITY, &d, &context_); r.Start(); base::RunLoop().Run(); @@ -6677,7 +6915,7 @@ TEST_F(URLRequestTestFTP, UnsafePort) { TestDelegate d; { - URLRequest r(url, &d, &default_context_); + URLRequest r(url, DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6695,7 +6933,8 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPDirectoryListing) { TestDelegate d; { - URLRequest r(test_server_.GetURL("/"), &d, &default_context_); + URLRequest r( + test_server_.GetURL("/"), DEFAULT_PRIORITY, &d, &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6721,7 +6960,10 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTestAnonymous) { app_path = app_path.AppendASCII("LICENSE"); TestDelegate d; { - URLRequest r(test_server_.GetURL("/LICENSE"), &d, &default_context_); + URLRequest r(test_server_.GetURL("/LICENSE"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6752,6 +6994,7 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPGetTest) { { URLRequest r( test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome", "chrome"), + DEFAULT_PRIORITY, &d, &default_context_); r.Start(); @@ -6786,12 +7029,11 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPassword) { app_path = app_path.AppendASCII("LICENSE"); TestDelegate d; { - URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "chrome", - "wrong_password"), - &d, - &default_context_); + URLRequest r(test_server_.GetURLWithUserAndPassword( + "/LICENSE", "chrome", "wrong_password"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6819,12 +7061,11 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongPasswordRestart) { // the initial login with wrong credentials will fail. d.set_credentials(AuthCredentials(kChrome, kChrome)); { - URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "chrome", - "wrong_password"), - &d, - &default_context_); + URLRequest r(test_server_.GetURLWithUserAndPassword( + "/LICENSE", "chrome", "wrong_password"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6849,12 +7090,11 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUser) { app_path = app_path.AppendASCII("LICENSE"); TestDelegate d; { - URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "wrong_user", - "chrome"), - &d, - &default_context_); + URLRequest r(test_server_.GetURLWithUserAndPassword( + "/LICENSE", "wrong_user", "chrome"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6882,12 +7122,11 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCheckWrongUserRestart) { // the initial login with wrong credentials will fail. d.set_credentials(AuthCredentials(kChrome, kChrome)); { - URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "wrong_user", - "chrome"), - &d, - &default_context_); + URLRequest r(test_server_.GetURLWithUserAndPassword( + "/LICENSE", "wrong_user", "chrome"), + DEFAULT_PRIORITY, + &d, + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6915,9 +7154,8 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) { { // Pass correct login identity in the URL. URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "chrome", - "chrome"), + test_server_.GetURLWithUserAndPassword("/LICENSE", "chrome", "chrome"), + DEFAULT_PRIORITY, d.get(), &default_context_); r.Start(); @@ -6937,7 +7175,10 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheURLCredentials) { d.reset(new TestDelegate); { // This request should use cached identity from previous request. - URLRequest r(test_server_.GetURL("/LICENSE"), d.get(), &default_context_); + URLRequest r(test_server_.GetURL("/LICENSE"), + DEFAULT_PRIORITY, + d.get(), + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6966,12 +7207,11 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) { // the initial login with wrong credentials will fail. d->set_credentials(AuthCredentials(kChrome, kChrome)); { - URLRequest r( - test_server_.GetURLWithUserAndPassword("/LICENSE", - "chrome", - "wrong_password"), - d.get(), - &default_context_); + URLRequest r(test_server_.GetURLWithUserAndPassword( + "/LICENSE", "chrome", "wrong_password"), + DEFAULT_PRIORITY, + d.get(), + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); @@ -6992,7 +7232,10 @@ TEST_F(URLRequestTestFTP, DISABLED_FTPCacheLoginBoxCredentials) { { // Don't pass wrong credentials in the URL, they would override valid cached // ones. - URLRequest r(test_server_.GetURL("/LICENSE"), d.get(), &default_context_); + URLRequest r(test_server_.GetURL("/LICENSE"), + DEFAULT_PRIORITY, + d.get(), + &default_context_); r.Start(); EXPECT_TRUE(r.is_pending()); |