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

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

Issue 2275693002: Revert "Add Accept-Encoding: br for secure Data Reduction Proxy requests." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 54a2d1d3f89e7d6d04b0a675565c5f33ba026908..458399272f67dd568c965f019b7ff784d0a61c1f 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
@@ -849,45 +849,6 @@ TEST_F(DataReductionProxyNetworkDelegateTest,
1);
}
-TEST_F(DataReductionProxyNetworkDelegateTest, TestAcceptEncodingBrotli) {
- const struct {
- net::ProxyServer proxy;
- bool brotli_enabled;
- std::string expected_accept_encoding;
- } tests[] = {
- {net::ProxyServer(net::ProxyServer::SCHEME_HTTPS,
- net::HostPortPair("origin.net", 80)),
- true, "gzip, br"},
- {net::ProxyServer(net::ProxyServer::SCHEME_QUIC,
- net::HostPortPair("origin.net", 80)),
- true, "gzip, br"},
- {net::ProxyServer(net::ProxyServer::SCHEME_HTTPS,
- net::HostPortPair("origin.net", 80)),
- false, "gzip"},
- {net::ProxyServer(net::ProxyServer::SCHEME_HTTP,
- net::HostPortPair("origin.net", 80)),
- true, "gzip"},
- };
- for (auto test : tests) {
- net::ProxyInfo data_reduction_proxy_info;
- data_reduction_proxy_info.UseProxyServer(test.proxy);
- net::HttpRequestHeaders headers;
- headers.SetHeader(net::HttpRequestHeaders::kAcceptEncoding, "gzip");
- context()->set_enable_brotli(test.brotli_enabled);
- std::unique_ptr<net::URLRequest> request = context()->CreateRequest(
- GURL("http://www.google.com/"), net::RequestPriority::IDLE, nullptr);
-
- network_delegate()->NotifyBeforeSendHeaders(
- request.get(), data_reduction_proxy_info, net::ProxyRetryInfoMap(),
- &headers);
-
- std::string got_accept_encoding;
- EXPECT_TRUE(headers.GetHeader(net::HttpRequestHeaders::kAcceptEncoding,
- &got_accept_encoding));
- EXPECT_EQ(test.expected_accept_encoding, got_accept_encoding);
- }
-}
-
} // namespace
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698