Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: net/url_request/url_request_throttler_unittest.cc

Issue 10190002: Remove X-Retry-After support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_throttler_test_support.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_unittest.cc
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc
index 8ea46b0552b573f52b4ded3c21fc3a477f74465b..88243db45d37226d3b01334b23a1af2daef399e1 100644
--- a/net/url_request/url_request_throttler_unittest.cc
+++ b/net/url_request/url_request_throttler_unittest.cc
@@ -180,7 +180,6 @@ class URLRequestThrottlerEntryTest : public testing::Test {
// List of all histograms we care about in these unit tests.
const char* kHistogramNames[] = {
- "Throttling.CustomRetryAfterMs",
"Throttling.FailureCountAtSuccess",
"Throttling.PerceivedDowntime",
"Throttling.RequestThrottled",
@@ -255,26 +254,6 @@ TEST_F(URLRequestThrottlerEntryTest, InterfaceNotDuringExponentialBackoff) {
ASSERT_EQ(0, samples_["Throttling.RequestThrottled"].counts(1));
}
-TEST_F(URLRequestThrottlerEntryTest, InterfaceUpdateRetryAfter) {
- // If the response we received has a retry-after field,
- // the request should be delayed.
- MockURLRequestThrottlerHeaderAdapter header_w_delay_header("5.5", "", 200);
- entry_->UpdateWithResponse("", &header_w_delay_header);
- EXPECT_GT(entry_->GetExponentialBackoffReleaseTime(), entry_->fake_time_now_)
- << "When the server put a positive value in retry-after we should "
- "increase release_time";
-
- entry_->ResetToBlank(now_);
- MockURLRequestThrottlerHeaderAdapter header_w_negative_header(
- "-5.5", "", 200);
- entry_->UpdateWithResponse("", &header_w_negative_header);
- EXPECT_EQ(entry_->GetExponentialBackoffReleaseTime(), entry_->fake_time_now_)
- << "When given a negative value, it should not change the release_time";
-
- CalculateHistogramDeltas();
- ASSERT_EQ(1, samples_["Throttling.CustomRetryAfterMs"].TotalCount());
-}
-
TEST_F(URLRequestThrottlerEntryTest, InterfaceUpdateFailure) {
MockURLRequestThrottlerHeaderAdapter failure_response(503);
entry_->UpdateWithResponse("", &failure_response);
« no previous file with comments | « net/url_request/url_request_throttler_test_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698