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

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: bengr comments 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 8609191f30b4bb44c11c641939fab2f5a949eba5..8f277a960a60490e1dcbc309e1e0c25c43653103 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
@@ -996,8 +996,8 @@ TEST_F(DataReductionProxyNetworkDelegateTest, RequestDataConfigurations) {
: net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
data->effective_connection_type());
EXPECT_TRUE(data->used_data_reduction_proxy());
- EXPECT_EQ(GURL(kTestURL), data->request_url());
- EXPECT_EQ("fake-session", data->session_key());
+ EXPECT_EQ(test.main_frame ? GURL(kTestURL) : GURL(), data->request_url());
+ EXPECT_EQ(test.main_frame ? "fake-session" : "", data->session_key());
EXPECT_EQ(test.lofi_on, data->lofi_requested());
}
}
@@ -1317,8 +1317,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);
}
}
@@ -1346,7 +1348,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