diff options
Diffstat (limited to 'net/url_request/url_request_throttler_unittest.cc')
-rw-r--r-- | net/url_request/url_request_throttler_unittest.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc index 5f8f2ee..f6227b3 100644 --- a/net/url_request/url_request_throttler_unittest.cc +++ b/net/url_request/url_request_throttler_unittest.cc @@ -325,8 +325,13 @@ TEST_F(URLRequestThrottlerEntryTest, MalformedContent) { TimeTicks release_after_failures = entry_->GetExponentialBackoffReleaseTime(); // Inform the entry that a response body was malformed, which is supposed to - // increase the back-off time. + // increase the back-off time. Note that we also submit a successful + // UpdateWithResponse to pair with ReceivedContentWasMalformed() since that + // is what happens in practice (if a body is received, then a non-500 + // response must also have been received). entry_->ReceivedContentWasMalformed(); + MockURLRequestThrottlerHeaderAdapter success_adapter(200); + entry_->UpdateWithResponse("", &success_adapter); EXPECT_GT(entry_->GetExponentialBackoffReleaseTime(), release_after_failures); } |