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

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

Issue 2833523002: Adding opt out and previews type information to DRP pingback (Closed)
Patch Set: moved definition up Created 3 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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
index 8e3a0d46236cfc3d2322ee37a4f9ab385344ed82..ed61de48cdc2d6f6cb7f3dd8d88acbe1f61f73c6 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -1113,8 +1113,10 @@ TEST_F(DataReductionProxyNetworkDelegateTest, OnCompletedInternalLoFi) {
response_headers += "Chrome-Proxy-Content-Transform: empty-image\r\n";
response_headers += "\r\n";
- FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140, 0);
-
+ auto request =
+ FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140, 0);
+ EXPECT_EQ(tests[i].lofi_response,
+ DataReductionProxyData::GetData(*request)->lofi_received());
VerifyDidNotifyLoFiResponse(tests[i].lofi_response);
}
}
@@ -1142,7 +1144,9 @@ TEST_F(DataReductionProxyNetworkDelegateTest,
"x-original-content-length: 200\r\n";
response_headers += "\r\n";
- FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140, 0);
+ auto request =
+ FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140, 0);
+ EXPECT_TRUE(DataReductionProxyData::GetData(*request)->lite_page_received());
histogram_tester.ExpectBucketCount(kLoFiTransformationTypeHistogram,
LITE_PAGE, 1);

Powered by Google App Engine
This is Rietveld 408576698