| 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 dda12cc8cfa86f5aecf75b0a9dc9b38bceb2612e..e787e52efb44d6dff49756a834b9cc13ef53b8c2 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
|
| @@ -128,21 +128,17 @@ class TestLoFiDecider : public LoFiDecider {
|
|
|
| class TestLoFiUIService : public LoFiUIService {
|
| public:
|
| - TestLoFiUIService() : on_lofi_response_(false), is_preview_(false) {}
|
| + TestLoFiUIService() : on_lofi_response_(false) {}
|
| ~TestLoFiUIService() override {}
|
|
|
| bool DidNotifyLoFiResponse() const { return on_lofi_response_; }
|
| - bool is_preview() const { return is_preview_; }
|
|
|
| - void OnLoFiReponseReceived(const net::URLRequest& request,
|
| - bool is_preview) override {
|
| + void OnLoFiReponseReceived(const net::URLRequest& request) override {
|
| on_lofi_response_ = true;
|
| - is_preview_ = is_preview;
|
| }
|
|
|
| private:
|
| bool on_lofi_response_;
|
| - bool is_preview_;
|
| };
|
|
|
| // Overrides net::NetworkQualityEstimator for testing.
|
| @@ -214,10 +210,6 @@ class DataReductionProxyNetworkDelegateTest : public testing::Test {
|
| EXPECT_EQ(lofi_response, lofi_ui_service_->DidNotifyLoFiResponse());
|
| }
|
|
|
| - void VerifyLoFiPreviewResponse(bool is_preview) const {
|
| - EXPECT_EQ(is_preview, lofi_ui_service_->is_preview());
|
| - }
|
| -
|
| void VerifyDataReductionProxyData(const net::URLRequest& request,
|
| bool data_reduction_proxy_used,
|
| bool lofi_used) {
|
| @@ -794,34 +786,6 @@ TEST_F(DataReductionProxyNetworkDelegateTest, OnCompletedInternalLoFi) {
|
| }
|
| }
|
|
|
| -TEST_F(DataReductionProxyNetworkDelegateTest, OnCompletedInternalLoFiPreview) {
|
| - // Enable Lo-Fi.
|
| - const struct {
|
| - bool is_preview;
|
| - } tests[] = {
|
| - {false}, {true},
|
| - };
|
| -
|
| - for (size_t i = 0; i < arraysize(tests); ++i) {
|
| - std::string response_headers =
|
| - "HTTP/1.1 200 OK\r\n"
|
| - "Date: Wed, 28 Nov 2007 09:40:09 GMT\r\n"
|
| - "Expires: Mon, 24 Nov 2014 12:45:26 GMT\r\n"
|
| - "Via: 1.1 Chrome-Compression-Proxy\r\n"
|
| - "x-original-content-length: 200\r\n";
|
| -
|
| - if (tests[i].is_preview)
|
| - response_headers += "Chrome-Proxy: q=preview\r\n";
|
| -
|
| - response_headers += "\r\n";
|
| - FetchURLRequest(GURL("http://www.google.com/"), nullptr, response_headers,
|
| - 140);
|
| -
|
| - VerifyDidNotifyLoFiResponse(tests[i].is_preview);
|
| - VerifyLoFiPreviewResponse(tests[i].is_preview);
|
| - }
|
| -}
|
| -
|
| TEST_F(DataReductionProxyNetworkDelegateTest,
|
| TestLoFiTransformationTypeHistogram) {
|
| const char kLoFiTransformationTypeHistogram[] =
|
|
|