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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc

Issue 2261103002: Use modified URLRequest::Read() and delegate methods in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: comments Created 4 years, 3 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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
index 49fd8d78cec69c7396d182050b6eac8aa36e5486..97898ae4c031f08ad648d43c13b07fec32283f36 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
@@ -179,7 +179,7 @@ TEST_F(DataReductionProxyBypassStatsTest, IsDataReductionProxyUnreachable) {
bypass_stats->OnProxyFallback(fallback_proxy_server,
net::ERR_PROXY_CONNECTION_FAILED);
- bypass_stats->OnUrlRequestCompleted(url_request(), false);
+ bypass_stats->OnUrlRequestCompleted(url_request(), false, net::OK);
RunUntilIdle();
EXPECT_EQ(test_case.is_unreachable, IsUnreachable());
@@ -203,7 +203,7 @@ TEST_F(DataReductionProxyBypassStatsTest, ProxyUnreachableThenReachable) {
EXPECT_TRUE(IsUnreachable());
// proxy succeeds
- bypass_stats->OnUrlRequestCompleted(url_request(), false);
+ bypass_stats->OnUrlRequestCompleted(url_request(), false, net::OK);
RunUntilIdle();
EXPECT_FALSE(IsUnreachable());
}
@@ -219,7 +219,7 @@ TEST_F(DataReductionProxyBypassStatsTest, ProxyReachableThenUnreachable) {
.WillRepeatedly(testing::Return(true));
// Proxy succeeds.
- bypass_stats->OnUrlRequestCompleted(url_request(), false);
+ bypass_stats->OnUrlRequestCompleted(url_request(), false, net::OK);
RunUntilIdle();
EXPECT_FALSE(IsUnreachable());
@@ -499,7 +499,8 @@ TEST_F(DataReductionProxyBypassStatsTest, SuccessfulRequestCompletion) {
.WillRepeatedly(testing::DoAll(testing::SetArgPointee<1>(proxy_info),
Return(test.was_proxy_used)));
- bypass_stats->OnUrlRequestCompleted(fake_request.get(), false);
+ bypass_stats->OnUrlRequestCompleted(fake_request.get(), false,
+ test.net_error);
if (test.was_proxy_used && !test.is_load_bypass_proxy &&
test.net_error == net::OK) {

Powered by Google App Engine
This is Rietveld 408576698