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 "chrome/browser/prefs/command_line_pref_store.h" | 5 #include "chrome/browser/prefs/command_line_pref_store.h" |
6 | 6 |
7 #include <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "chrome/browser/prefs/command_line_pref_store.h" | 13 #include "chrome/browser/prefs/command_line_pref_store.h" |
14 #include "chrome/browser/prefs/pref_service_mock_factory.h" | |
15 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
16 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 15 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
| 16 #include "components/syncable_prefs/pref_service_mock_factory.h" |
17 #include "net/proxy/proxy_config_service_common_unittest.h" | 17 #include "net/proxy/proxy_config_service_common_unittest.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Test parameter object for testing command line proxy configuration. | 22 // Test parameter object for testing command line proxy configuration. |
23 struct CommandLineTestParams { | 23 struct CommandLineTestParams { |
24 // Short description to identify the test. | 24 // Short description to identify the test. |
25 const char* description; | 25 const char* description; |
26 | 26 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 TEST_P(CommandLinePrefStoreProxyTest, CommandLine) { | 186 TEST_P(CommandLinePrefStoreProxyTest, CommandLine) { |
187 EXPECT_EQ(GetParam().auto_detect, proxy_config()->auto_detect()); | 187 EXPECT_EQ(GetParam().auto_detect, proxy_config()->auto_detect()); |
188 EXPECT_EQ(GetParam().pac_url, proxy_config()->pac_url()); | 188 EXPECT_EQ(GetParam().pac_url, proxy_config()->pac_url()); |
189 EXPECT_TRUE(GetParam().proxy_rules.Matches(proxy_config()->proxy_rules())); | 189 EXPECT_TRUE(GetParam().proxy_rules.Matches(proxy_config()->proxy_rules())); |
190 } | 190 } |
191 | 191 |
192 INSTANTIATE_TEST_CASE_P(CommandLinePrefStoreProxyTestInstance, | 192 INSTANTIATE_TEST_CASE_P(CommandLinePrefStoreProxyTestInstance, |
193 CommandLinePrefStoreProxyTest, | 193 CommandLinePrefStoreProxyTest, |
194 testing::ValuesIn(kCommandLineTestParams)); | 194 testing::ValuesIn(kCommandLineTestParams)); |
OLD | NEW |