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

Side by Side Diff: chrome/browser/net/chrome_url_request_context_unittest.cc

Issue 2823037: Add an ExtensionPrefStore, layered between the user prefs nad the managed pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/net/chrome_url_request_context.h" 5 #include "chrome/browser/net/chrome_url_request_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "chrome/browser/configuration_policy_pref_store.h" 9 #include "chrome/browser/configuration_policy_pref_store.h"
10 #include "chrome/browser/pref_value_store.h" 10 #include "chrome/browser/pref_value_store.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 GURL(), // pac_url 152 GURL(), // pac_url
153 net::ProxyRulesExpectation::Empty(), 153 net::ProxyRulesExpectation::Empty(),
154 } 154 }
155 }; 155 };
156 156
157 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); i++) { 157 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); i++) {
158 SCOPED_TRACE(StringPrintf("Test[%" PRIuS "] %s", i, 158 SCOPED_TRACE(StringPrintf("Test[%" PRIuS "] %s", i,
159 tests[i].description.c_str())); 159 tests[i].description.c_str()));
160 CommandLine command_line(tests[i].command_line); 160 CommandLine command_line(tests[i].command_line);
161 PrefService prefs(new PrefValueStore( 161 PrefService prefs(new PrefValueStore(
162 new ConfigurationPolicyPrefStore(&command_line, NULL), NULL, NULL)); 162 new ConfigurationPolicyPrefStore(&command_line, NULL),
163 NULL, NULL, NULL)); // No extension, user, or recommended prefs.
163 ChromeURLRequestContextGetter::RegisterUserPrefs(&prefs); 164 ChromeURLRequestContextGetter::RegisterUserPrefs(&prefs);
164 scoped_ptr<net::ProxyConfig> config(CreateProxyConfig(&prefs)); 165 scoped_ptr<net::ProxyConfig> config(CreateProxyConfig(&prefs));
165 166
166 if (tests[i].is_null) { 167 if (tests[i].is_null) {
167 EXPECT_TRUE(config == NULL); 168 EXPECT_TRUE(config == NULL);
168 } else { 169 } else {
169 EXPECT_TRUE(config != NULL); 170 EXPECT_TRUE(config != NULL);
170 EXPECT_EQ(tests[i].auto_detect, config->auto_detect()); 171 EXPECT_EQ(tests[i].auto_detect, config->auto_detect());
171 EXPECT_EQ(tests[i].pac_url, config->pac_url()); 172 EXPECT_EQ(tests[i].pac_url, config->pac_url());
172 EXPECT_TRUE(tests[i].proxy_rules.Matches(config->proxy_rules())); 173 EXPECT_TRUE(tests[i].proxy_rules.Matches(config->proxy_rules()));
173 } 174 }
174 } 175 }
175 } 176 }
176 177
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service_uitest.cc ('k') | chrome/browser/pref_member_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698