Lines Matching refs:request
292 // request start operation (async) will finish without seeing the end of
570 const MockHttpRequest& request,
582 rv = trans->Start(&request, &callback, load_log);
598 const MockHttpRequest& request,
600 RunTransactionTestWithRequestAndLog(cache, trans_info, request,
642 static void FastNoStoreHandler(const net::HttpRequestInfo* request,
672 // request can be served on demand.
695 static void RangeHandler(const net::HttpRequestInfo* request,
710 // A dummy extra header that must be preserved on a given request.
714 void RangeTransactionServer::RangeHandler(const net::HttpRequestInfo* request,
718 if (request->extra_headers.empty()) {
724 EXPECT_TRUE(request->extra_headers.find(EXTRA_HEADER) != std::string::npos);
732 if (!net::HttpUtil::ParseRanges(request->extra_headers, &ranges) ||
735 // We can handle this range request.
748 size_t if_range_header = request->extra_headers.find("If-Range");
752 request->extra_headers.find("If-Range", if_range_header + 1));
759 if (request->extra_headers.find("If-None-Match") == std::string::npos ||
943 // request to fail.
947 MockHttpRequest request(kSimpleGET_Transaction);
953 rv = c->trans->Start(&request, &c->callback, NULL);
957 // Start failing request now.
1039 MockHttpRequest request(transaction);
1047 rv = trans->Start(&request, &callback, NULL);
1182 const net::HttpRequestInfo* request,
1186 EXPECT_TRUE(request->extra_headers.find(EXTRA_HEADER) != std::string::npos);
1233 MockHttpRequest request(kSimpleGET_Transaction);
1245 c->result = c->trans->Start(&request, &c->callback, NULL);
1251 // The first request should be a writer at this point, and the subsequent
1278 // If cancelling a request is racing with another request for the same resource
1284 MockHttpRequest request(kSimpleGET_Transaction);
1298 MockHttpRequest* this_request = &request;
1308 // The first request should be a writer at this point, and the subsequent
1329 // the queue to move to the next transaction. Now we cancel the request that
1331 // next request.
1365 MockHttpRequest request(kSimpleGET_Transaction);
1379 MockHttpRequest* this_request = &request;
1386 // The first request should be a writer at this point, and the two subsequent
1387 // requests should be pending. The last request doomed the first entry.
1411 // The headers will be served right from the call to Start() the request.
1412 MockHttpRequest request(kFastNoStoreGET_Transaction);
1426 c->result = c->trans->Start(&request, &c->callback, NULL);
1432 // The first request should be a writer at this point, and the subsequent
1439 // Now, make sure that the second request asks for the entry not to be stored.
1460 MockHttpRequest request(kSimpleGET_Transaction);
1472 c->result = c->trans->Start(&request, &c->callback, NULL);
1478 // The first request should be a writer at this point, and the subsequent
1519 MockHttpRequest request(kSimpleGET_Transaction);
1531 c->result = c->trans->Start(&request, &c->callback, NULL);
1534 // The first request should be creating the disk cache entry and the others
1541 // Cancel a request from the pending queue.
1545 // Cancel the request that is creating the entry. This will force the pending
1574 MockHttpRequest request(kSimpleGET_Transaction);
1575 request.load_flags = net::LOAD_BYPASS_CACHE;
1587 c->result = c->trans->Start(&request, &c->callback, NULL);
1590 // The first request should be deleting the disk cache entry and the others
1621 MockHttpRequest request(kSimpleGET_Transaction);
1627 rv = trans->Start(&request, &callback, NULL);
1656 // in a conditional request.
1665 const net::HttpRequestInfo* request,
1669 EXPECT_TRUE(request->extra_headers.find("If-None-Match") !=
1689 // in a conditional request.
1700 const net::HttpRequestInfo* request,
1704 EXPECT_TRUE(request->extra_headers.find("If-None-Match") !=
1724 // in a conditional request.
1787 // Request |kUrl| for the first time. It should hit the network and
1790 MockTransaction request = { 0 };
1791 request.url = kUrl;
1792 request.method = "GET";
1793 request.request_headers = "";
1796 net_response_1.AssignTo(&request); // Expected result.
1800 cache.http_cache(), request, &response_headers);
1807 // Request |kUrl| a second time. Now |kNetResponse1| it is in the HTTP
1810 request.load_flags = net::LOAD_ONLY_FROM_CACHE;
1813 net_response_1.AssignTo(&request); // Expected result.
1816 cache.http_cache(), request, &response_headers);
1823 // Request |kUrl| yet again, but this time give the request an
1824 // "If-Modified-Since" header. This will cause the request to re-hit the
1828 request.request_headers = extra_request_headers;
1829 request.load_flags = net::LOAD_NORMAL;
1832 net_response_2.AssignTo(&request); // Expected result.
1835 cache.http_cache(), request, &response_headers);
1842 // Finally, request |kUrl| again. This request should be serviced from
1847 request.request_headers = "";
1848 request.load_flags = net::LOAD_ONLY_FROM_CACHE;
1851 cached_response_2.AssignTo(&request); // Expected result.
1854 cache.http_cache(), request, &response_headers);
1865 // to the request, the result still updates the cached entry.
1891 // to the request, the result updates the cached entry.
1918 // to a request, the 304 (not modified result) result updates the cached
1978 MockTransaction request = { 0 };
1979 request.url = kUrl;
1980 request.method = "GET";
1981 request.request_headers = kExtraRequestHeaders;
1984 kNetResponse.AssignTo(&request); // Expected result.
1988 cache.http_cache(), request, &response_headers);
2022 MockTransaction request = { 0 };
2023 request.url = kUrl;
2024 request.method = "GET";
2025 request.request_headers = kExtraRequestHeaders;
2028 kNetResponse.AssignTo(&request); // Expected result.
2032 cache.http_cache(), request, &response_headers);
2101 // Test that doing an externally conditionalized request with both if-none-match
2129 // Test that doing an externally conditionalized request with both if-none-match
2158 // Test that doing an externally conditionalized request with both if-none-match
2187 // Test that doing an externally conditionalized request with two conflicting
2219 // Do a typical GET request -- should write an entry into our cache.
2227 // Request the same URL, but this time with a reference section (hash).
2250 MockHttpRequest request(transaction);
2258 rv = trans->Start(&request, &callback, NULL);
2279 MockHttpRequest request(transaction);
2280 request.upload_data = new net::UploadData();
2281 request.upload_data->set_identifier(kUploadId);
2282 request.upload_data->AppendBytes("hello", 5);
2285 RunTransactionTestWithRequest(cache.http_cache(), transaction, request, NULL);
2292 request.load_flags |= net::LOAD_ONLY_FROM_CACHE;
2293 RunTransactionTestWithRequest(cache.http_cache(), transaction, request, NULL);
2366 // Tests that receiving 206 for a regular request is handled correctly.
2570 // We start with one suffix request, followed by a request from a given point.
2605 // We start with one request from a given point, followed by a suffix request.
2740 // Tests that we can handle a regular request to a sparse entry, that results in
2759 // Now we'll issue a request without any range that should result first in a
2775 // Verify that the previous request deleted the entry.
2824 // we issue a range request and expect to receive a range.
2934 // Now we'll issue a request that results in a plain 200 response, but to
2956 // Tests that a range request that falls outside of the size that we know about
2973 // A weird request should not delete this entry. Ask for bytes 120-.
2990 // Tests that we don't delete a sparse entry when we cancel a request.
2996 MockHttpRequest request(kRangeGET_TransactionOK);
3002 rv = c->trans->Start(&request, &c->callback, NULL);
3028 // Tests that we don't delete a sparse entry when we start a new request after
3036 MockHttpRequest request(kRangeGET_TransactionOK);
3042 rv = c->trans->Start(&request, &c->callback, NULL);
3081 MockHttpRequest request(kRangeGET_TransactionOK);
3087 rv = c->trans->Start(&request, &c->callback, NULL);
3114 rv = c->trans->Start(&request, &c->callback, NULL);
3273 // Tests that we don't crash with a range request if the disk cache was not
3309 // request for the next range and the server gives us a 200 synchronously.
3392 MockHttpRequest request(transaction);
3400 rv = trans->Start(&request, &callback, NULL);
3427 // Set the last argument for this to be an incomplete request.
3441 // Tests that we delete an entry when the request is cancelled before starting
3447 MockHttpRequest request(kSimpleGET_Transaction);
3453 rv = c->trans->Start(&request, &c->callback, NULL);
3472 // Tests that we delete an entry when the request is cancelled if the response
3478 MockHttpRequest request(kSimpleGET_Transaction);
3484 rv = c->trans->Start(&request, &c->callback, NULL);
3509 // Tests that we delete an entry when the request is cancelled if the response
3522 MockHttpRequest request(transaction);
3528 rv = c->trans->Start(&request, &c->callback, NULL);
3555 // Tests that we mark an entry as incomplete when the request is cancelled.
3566 MockHttpRequest request(transaction);
3572 rv = c->trans->Start(&request, &c->callback, NULL);
3603 // Tests that we can continue with a request that was interrupted.
3625 // Set the last argument for this to be an incomplete request.
3633 // Now make a regular request.
3688 // Set the last argument for this to be an incomplete request.
3697 // Now make a regular request.
3724 // Tests that when we cancel a request that was interrupted, we mark it again
3748 request.
3756 // Now make a regular request.
3760 MockHttpRequest request(transaction);
3764 int rv = c->trans->Start(&request, &c->callback, NULL);
3773 // At this point, we are already reading so canceling the request should leave
3814 // Set the last argument for this to be an incomplete request.
3823 // Now make a range request.
3877 // This test ensures that a conditional request, which results in a 200
3899 MockHttpRequest request(kTestTransaction);
3909 rv = trans->Start(&request, &callback, NULL);
3937 rv = trans->Start(&request, &callback, NULL);
4057 MockHttpRequest request(transaction);
4065 rv = trans->Start(&request, &callback, NULL);
4119 // Request |kUrl|, causing |kNetResponse1| to be written to the cache.
4121 MockTransaction request = { 0 };
4122 request.url = kUrl;
4123 request.method = "GET";
4124 request.request_headers = "";
4125 request.data = kData;
4136 RunTransactionTest(cache.http_cache(), request);
4138 // Request |kUrl| again, this time validating the cache and getting
4141 request.load_flags = net::LOAD_VALIDATE_CACHE;
4158 RunTransactionTestWithResponseInfo(cache.http_cache(), request, &response);
4160 // The request and response times should have been updated.