OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/command_line_pref_store.h" | 11 #include "chrome/browser/prefs/command_line_pref_store.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class TestCommandLinePrefStore : public CommandLinePrefStore { | 17 class TestCommandLinePrefStore : public CommandLinePrefStore { |
18 public: | 18 public: |
19 explicit TestCommandLinePrefStore(CommandLine* cl) | 19 explicit TestCommandLinePrefStore(CommandLine* cl) |
20 : CommandLinePrefStore(cl) {} | 20 : CommandLinePrefStore(cl) {} |
21 | 21 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // All proxy switches except no-proxy. | 121 // All proxy switches except no-proxy. |
122 CommandLine cl2(CommandLine::ARGUMENTS_ONLY); | 122 CommandLine cl2(CommandLine::ARGUMENTS_ONLY); |
123 cl2.AppendSwitch(switches::kProxyAutoDetect); | 123 cl2.AppendSwitch(switches::kProxyAutoDetect); |
124 cl2.AppendSwitchASCII(switches::kProxyServer, "server"); | 124 cl2.AppendSwitchASCII(switches::kProxyServer, "server"); |
125 cl2.AppendSwitchASCII(switches::kProxyPacUrl, "url"); | 125 cl2.AppendSwitchASCII(switches::kProxyPacUrl, "url"); |
126 cl2.AppendSwitchASCII(switches::kProxyBypassList, "list"); | 126 cl2.AppendSwitchASCII(switches::kProxyBypassList, "list"); |
127 TestCommandLinePrefStore store4(&cl2); | 127 TestCommandLinePrefStore store4(&cl2); |
128 EXPECT_EQ(store4.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE); | 128 EXPECT_EQ(store4.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE); |
129 EXPECT_TRUE(store4.ProxySwitchesAreValid()); | 129 EXPECT_TRUE(store4.ProxySwitchesAreValid()); |
130 } | 130 } |
OLD | NEW |