OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/prefs/pref_registry_simple.h" | |
9 #include "base/prefs/testing_pref_service.h" | |
10 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 9 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_test_utils.h" | 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_test_utils.h" |
13 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" | 11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" |
14 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 12 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
15 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s_test_utils.h" | 13 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s_test_utils.h" |
| 14 #include "components/prefs/pref_registry_simple.h" |
| 15 #include "components/prefs/testing_pref_service.h" |
16 #include "components/proxy_config/proxy_config_pref_names.h" | 16 #include "components/proxy_config/proxy_config_pref_names.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using testing::_; | 19 using testing::_; |
20 using testing::Return; | 20 using testing::Return; |
21 | 21 |
22 class DataReductionProxyChromeSettingsTest : public testing::Test { | 22 class DataReductionProxyChromeSettingsTest : public testing::Test { |
23 public: | 23 public: |
24 void SetUp() override { | 24 void SetUp() override { |
25 drp_chrome_settings_ = | 25 drp_chrome_settings_ = |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 EXPECT_EQ("fixed_servers", mode); | 327 EXPECT_EQ("fixed_servers", mode); |
328 std::string server; | 328 std::string server; |
329 EXPECT_TRUE(value->GetString("server", &server)); | 329 EXPECT_TRUE(value->GetString("server", &server)); |
330 EXPECT_EQ(test_server, server); | 330 EXPECT_EQ(test_server, server); |
331 | 331 |
332 histogram_tester.ExpectUniqueSample( | 332 histogram_tester.ExpectUniqueSample( |
333 "DataReductionProxy.ProxyPrefMigrationResult", | 333 "DataReductionProxy.ProxyPrefMigrationResult", |
334 DataReductionProxyChromeSettings::PROXY_PREF_NOT_CLEARED, 1); | 334 DataReductionProxyChromeSettings::PROXY_PREF_NOT_CLEARED, 1); |
335 } | 335 } |
336 } | 336 } |
OLD | NEW |