Lines Matching refs:req
441 TestURLRequest req(https_test_server.GetURL( in TEST_F() local
443 req.set_referrer("https://www.referrer.com/"); in TEST_F()
444 req.Start(); in TEST_F()
449 EXPECT_EQ(http_destination, req.url()); in TEST_F()
450 EXPECT_EQ(std::string(), req.referrer()); in TEST_F()
462 TestURLRequest req(original_url, &d); in TEST_F() local
463 req.Start(); in TEST_F()
468 EXPECT_EQ(destination_url, req.url()); in TEST_F()
469 EXPECT_EQ(original_url, req.original_url()); in TEST_F()
470 ASSERT_EQ(3U, req.url_chain().size()); in TEST_F()
471 EXPECT_EQ(original_url, req.url_chain()[0]); in TEST_F()
472 EXPECT_EQ(middle_redirect_url, req.url_chain()[1]); in TEST_F()
473 EXPECT_EQ(destination_url, req.url_chain()[2]); in TEST_F()
1084 TestURLRequest req(test_server_.GetURL("files/with-headers.html"), &d); in TEST_F() local
1085 req.Start(); in TEST_F()
1088 const HttpResponseHeaders* headers = req.response_headers(); in TEST_F()
1091 EXPECT_EQ(headers, req.response_info().headers.get()); in TEST_F()
1182 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1184 req.Start(); in TEST_F()
1188 req.GetMimeType(&mime_type); in TEST_F()
1192 req.GetCharset(&charset); in TEST_F()
1194 req.Cancel(); in TEST_F()
1208 TestURLRequest req(FilePathToFileURL(file_path), &d); in TEST_F() local
1209 req.Start(); in TEST_F()
1210 EXPECT_TRUE(req.is_pending()); in TEST_F()
1233 TestURLRequest req(FilePathToFileURL(path), &d); in TEST_F() local
1234 req.Start(); in TEST_F()
1240 ASSERT_TRUE(req.status().is_success()); in TEST_F()
1247 TestURLRequest req(GURL("file:///"), &d); in TEST_F() local
1248 req.Start(); in TEST_F()
1252 ASSERT_FALSE(req.status().is_success()); in TEST_F()
1260 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1262 req.Start(); in TEST_F()
1265 EXPECT_EQ(URLRequestStatus::FAILED, req.status().status()); in TEST_F()
1266 EXPECT_EQ(ERR_UNSAFE_REDIRECT, req.status().os_error()); in TEST_F()
1273 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1275 req.Start(); in TEST_F()
1278 EXPECT_EQ(URLRequestStatus::FAILED, req.status().status()); in TEST_F()
1279 EXPECT_EQ(ERR_INVALID_URL, req.status().os_error()); in TEST_F()
1286 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1288 req.set_referrer("http://user:pass@foo.com/"); in TEST_F()
1289 req.Start(); in TEST_F()
1301 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1303 req.Start(); in TEST_F()
1309 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
1319 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1321 req.Start(); in TEST_F()
1326 req.FollowDeferredRedirect(); in TEST_F()
1331 EXPECT_EQ(URLRequestStatus::SUCCESS, req.status().status()); in TEST_F()
1352 TestURLRequest req(test_server_.GetURL( in TEST_F() local
1354 req.Start(); in TEST_F()
1359 req.Cancel(); in TEST_F()
1365 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
1377 URLRequest req(test_server_.GetURL("echoheadercache?foo"), &d); in TEST_F() local
1378 req.set_context(context); in TEST_F()
1381 req.SetExtraRequestHeaders(headers); in TEST_F()
1382 req.Start(); in TEST_F()
1389 URLRequest req(test_server_.GetURL("echoheadercache?foo"), &d); in TEST_F() local
1390 req.set_context(context); in TEST_F()
1393 req.SetExtraRequestHeaders(headers); in TEST_F()
1394 req.Start(); in TEST_F()
1397 EXPECT_TRUE(req.was_cached()); in TEST_F()
1403 URLRequest req(test_server_.GetURL("echoheadercache?foo"), &d); in TEST_F() local
1404 req.set_context(context); in TEST_F()
1407 req.SetExtraRequestHeaders(headers); in TEST_F()
1408 req.Start(); in TEST_F()
1411 EXPECT_FALSE(req.was_cached()); in TEST_F()
1522 URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), &d); in TEST_F() local
1523 req.set_context(context); in TEST_F()
1524 req.Start(); in TEST_F()
1533 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1534 req.set_context(context); in TEST_F()
1535 req.Start(); in TEST_F()
1547 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1548 req.set_load_flags(LOAD_DO_NOT_SEND_COOKIES); in TEST_F()
1549 req.set_context(context); in TEST_F()
1550 req.Start(); in TEST_F()
1571 URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), in TEST_F() local
1573 req.set_context(context); in TEST_F()
1574 req.Start(); in TEST_F()
1585 URLRequest req(test_server.GetURL( in TEST_F() local
1587 req.set_load_flags(LOAD_DO_NOT_SAVE_COOKIES); in TEST_F()
1588 req.set_context(context); in TEST_F()
1589 req.Start(); in TEST_F()
1602 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1603 req.set_context(context); in TEST_F()
1604 req.Start(); in TEST_F()
1627 URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), &d); in TEST_F() local
1628 req.set_context(context); in TEST_F()
1629 req.Start(); in TEST_F()
1639 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1640 req.set_context(context); in TEST_F()
1641 req.Start(); in TEST_F()
1657 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1658 req.set_context(context); in TEST_F()
1659 req.Start(); in TEST_F()
1681 URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), in TEST_F() local
1683 req.set_context(context); in TEST_F()
1684 req.Start(); in TEST_F()
1697 URLRequest req(test_server.GetURL( in TEST_F() local
1699 req.set_context(context); in TEST_F()
1700 req.Start(); in TEST_F()
1714 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1715 req.set_context(context); in TEST_F()
1716 req.Start(); in TEST_F()
1738 URLRequest req(test_server.GetURL("set-cookie"), &d); in TEST_F() local
1739 req.set_context(context); in TEST_F()
1740 req.Start(); in TEST_F()
1758 URLRequest req(test_server.GetURL("set-cookie?CookieToNotSend=1"), &d); in TEST_F() local
1759 req.set_context(context); in TEST_F()
1760 req.Start(); in TEST_F()
1770 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1771 req.set_context(context); in TEST_F()
1772 req.Start(); in TEST_F()
1788 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1789 req.set_context(context); in TEST_F()
1790 req.Start(); in TEST_F()
1812 URLRequest req(test_server.GetURL("set-cookie?CookieToNotUpdate=2"), in TEST_F() local
1814 req.set_context(context); in TEST_F()
1815 req.Start(); in TEST_F()
1828 URLRequest req(test_server.GetURL( in TEST_F() local
1830 req.set_context(context); in TEST_F()
1831 req.Start(); in TEST_F()
1844 TestURLRequest req(test_server.GetURL("echoheader?Cookie"), &d); in TEST_F() local
1845 req.set_context(context); in TEST_F()
1846 req.Start(); in TEST_F()
1871 URLRequest req(test_server.GetURL( in TEST_F() local
1873 req.set_context(context); in TEST_F()
1874 req.Start(); // Triggers an asynchronous cookie policy check. in TEST_F()
1901 TestURLRequest req(test_server_.GetURL("files/redirect-to-echoall"), &d); in TEST_F() local
1902 req.set_method("POST"); in TEST_F()
1903 req.set_upload(CreateSimpleUploadData(kData)); in TEST_F()
1916 req.SetExtraRequestHeaders(headers); in TEST_F()
1917 req.Start(); in TEST_F()
1921 req.GetMimeType(&mime_type); in TEST_F()
1943 TestURLRequest req(test_server_.GetURL("files/redirect307-to-echo"), in TEST_F() local
1945 req.set_method("POST"); in TEST_F()
1946 req.set_upload(CreateSimpleUploadData(kData).get()); in TEST_F()
1950 req.SetExtraRequestHeaders(headers); in TEST_F()
1951 req.Start(); in TEST_F()
1953 EXPECT_EQ("POST", req.method()); in TEST_F()
2156 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2160 req.SetUserData(NULL, user_data0); in TEST_F()
2161 req.SetUserData(&user_data1, user_data1); in TEST_F()
2162 req.SetUserData(&user_data2, user_data2); in TEST_F()
2163 req.set_method("GET"); in TEST_F()
2164 req.Start(); in TEST_F()
2168 EXPECT_EQ(user_data0, req.GetUserData(NULL)); in TEST_F()
2169 EXPECT_EQ(user_data1, req.GetUserData(&user_data1)); in TEST_F()
2170 EXPECT_EQ(user_data2, req.GetUserData(&user_data2)); in TEST_F()
2176 EXPECT_TRUE(req.status().is_success()); in TEST_F()
2177 EXPECT_EQ(200, req.response_headers()->response_code()); in TEST_F()
2197 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2198 req.set_method("GET"); in TEST_F()
2199 req.Start(); in TEST_F()
2207 EXPECT_TRUE(req.status().is_success()); in TEST_F()
2208 if (req.status().is_success()) { in TEST_F()
2209 EXPECT_EQ(200, req.response_headers()->response_code()); in TEST_F()
2230 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2231 req.set_method("GET"); in TEST_F()
2232 req.Start(); in TEST_F()
2240 EXPECT_TRUE(req.status().is_success()); in TEST_F()
2241 EXPECT_EQ(200, req.response_headers()->response_code()); in TEST_F()
2259 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2260 req.set_method("GET"); in TEST_F()
2261 req.Start(); in TEST_F()
2269 EXPECT_TRUE(req.status().is_success()); in TEST_F()
2270 EXPECT_EQ(200, req.response_headers()->response_code()); in TEST_F()
2288 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2289 req.set_method("GET"); in TEST_F()
2290 req.Start(); in TEST_F()
2298 EXPECT_TRUE(req.status().is_success()); in TEST_F()
2299 if (req.status().is_success()) { in TEST_F()
2300 EXPECT_EQ(200, req.response_headers()->response_code()); in TEST_F()
2319 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2320 req.set_method("GET"); in TEST_F()
2321 req.Start(); in TEST_F()
2329 EXPECT_FALSE(req.status().is_success()); in TEST_F()
2330 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
2350 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2351 req.set_method("GET"); in TEST_F()
2352 req.Start(); in TEST_F()
2361 EXPECT_FALSE(req.status().is_success()); in TEST_F()
2362 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
2375 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2376 req.set_method("GET"); in TEST_F()
2377 req.Start(); in TEST_F()
2385 EXPECT_FALSE(req.status().is_success()); in TEST_F()
2386 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
2401 TestURLRequest req(GURL("http://test_intercept/foo"), &d); in TEST_F() local
2402 req.set_method("GET"); in TEST_F()
2403 req.Start(); in TEST_F()
2411 EXPECT_FALSE(req.status().is_success()); in TEST_F()
2412 EXPECT_EQ(URLRequestStatus::CANCELED, req.status().status()); in TEST_F()
2418 TestURLRequest req(GURL("http://example.com"), &d); in TEST_F() local
2421 ASSERT_NE(req.identifier(), other_req.identifier()); in TEST_F()
2429 TestURLRequest req(GURL("http://example.com"), &d); in TEST_F() local
2430 req.set_method("GET"); in TEST_F()
2438 req.set_context(context); in TEST_F()
2440 req.Start(); in TEST_F()
2444 EXPECT_FALSE(req.status().is_success()); in TEST_F()
2445 EXPECT_EQ(URLRequestStatus::FAILED, req.status().status()); in TEST_F()
2446 EXPECT_EQ(ERR_PROXY_CONNECTION_FAILED, req.status().os_error()); in TEST_F()
2777 TestURLRequest req(test_server_.GetURL("echoheader?Accept-Language"), &d); in TEST_F() local
2780 req.set_context(context); in TEST_F()
2781 req.Start(); in TEST_F()
2791 TestURLRequest req(test_server_.GetURL("echoheader?Accept-Language"), in TEST_F() local
2795 req.set_context(context); in TEST_F()
2796 req.Start(); in TEST_F()
2808 req(test_server_.GetURL("echoheader?Accept-Language"), &d); in TEST_F() local
2809 req.set_context(new TestURLRequestContext()); in TEST_F()
2812 req.SetExtraRequestHeaders(headers); in TEST_F()
2813 req.Start(); in TEST_F()
2823 TestURLRequest req(test_server_.GetURL("echoheader?Accept-Charset"), &d); in TEST_F() local
2826 req.set_context(context); in TEST_F()
2827 req.Start(); in TEST_F()
2837 TestURLRequest req(test_server_.GetURL("echoheader?Accept-Charset"), in TEST_F() local
2841 req.set_context(context); in TEST_F()
2842 req.Start(); in TEST_F()
2854 req(test_server_.GetURL("echoheader?Accept-Charset"), &d); in TEST_F() local
2855 req.set_context(new TestURLRequestContext()); in TEST_F()
2858 req.SetExtraRequestHeaders(headers); in TEST_F()
2859 req.Start(); in TEST_F()
2869 TestURLRequest req(test_server_.GetURL("echoheader?User-Agent"), &d); in TEST_F() local
2870 req.set_context(new TestURLRequestContext()); in TEST_F()
2871 req.Start(); in TEST_F()
2873 EXPECT_EQ(req.context()->GetUserAgent(req.url()), d.data_received()); in TEST_F()
2883 req(test_server_.GetURL("echoheader?User-Agent"), &d); in TEST_F() local
2884 req.set_context(new TestURLRequestContext()); in TEST_F()
2887 req.SetExtraRequestHeaders(headers); in TEST_F()
2888 req.Start(); in TEST_F()