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

Side by Side Diff: chrome/browser/extensions/extension_proxy_apitest.cc

Issue 7065033: Support persistent incognito preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 7 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
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/prefs/pref_service.h" 6 #include "chrome/browser/prefs/pref_service.h"
7 #include "chrome/browser/prefs/proxy_config_dictionary.h" 7 #include "chrome/browser/prefs/proxy_config_dictionary.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 "http=1.1.1.1:80;" 162 "http=1.1.1.1:80;"
163 "https=2.2.2.2:80;" 163 "https=2.2.2.2:80;"
164 "ftp=3.3.3.3:9000;" 164 "ftp=3.3.3.3:9000;"
165 "socks=socks4://4.4.4.4:9090", 165 "socks=socks4://4.4.4.4:9090",
166 kNoBypass, 166 kNoBypass,
167 kNoPac, 167 kNoPac,
168 pref_service); 168 pref_service);
169 } 169 }
170 170
171 // Tests setting values only for incognito mode 171 // Tests setting values only for incognito mode
172 // TODO(battre): re-enable when incognito is supported again
173 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, 172 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
174 DISABLED_ProxyFixedIndividualIncognitoOnly) { 173 ProxyFixedIndividualIncognitoOnly) {
175 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_only")) << 174 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_only")) <<
176 message_; 175 message_;
177 const Extension* extension = GetSingleLoadedExtension(); 176 const Extension* extension = GetSingleLoadedExtension();
178 ASSERT_TRUE(extension); 177 ASSERT_TRUE(extension);
179 178
180 PrefService* pref_service = browser()->profile()->GetPrefs(); 179 PrefService* pref_service = browser()->profile()->GetPrefs();
181 ExpectNoSettings(pref_service); 180 ExpectNoSettings(pref_service);
182 181
183 // Now check the incognito preferences. 182 // Now check the incognito preferences.
184 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs(); 183 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs();
185 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, 184 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS,
186 "http=1.1.1.1:80;" 185 "http=1.1.1.1:80;"
187 "https=socks5://2.2.2.2:1080;" 186 "https=socks5://2.2.2.2:1080;"
188 "ftp=3.3.3.3:9000;" 187 "ftp=3.3.3.3:9000;"
189 "socks=socks4://4.4.4.4:9090", 188 "socks=socks4://4.4.4.4:9090",
190 kNoBypass, 189 kNoBypass,
191 kNoPac, 190 kNoPac,
192 pref_service); 191 pref_service);
193 } 192 }
194 193
195 // Tests setting values also for incognito mode 194 // Tests setting values also for incognito mode
196 // TODO(battre): re-enable when incognito is supported again
197 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, 195 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
198 DISABLED_ProxyFixedIndividualIncognitoAlso) { 196 ProxyFixedIndividualIncognitoAlso) {
199 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_also")) << 197 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_also")) <<
200 message_; 198 message_;
201 const Extension* extension = GetSingleLoadedExtension(); 199 const Extension* extension = GetSingleLoadedExtension();
202 ASSERT_TRUE(extension); 200 ASSERT_TRUE(extension);
203 201
204 PrefService* pref_service = browser()->profile()->GetPrefs(); 202 PrefService* pref_service = browser()->profile()->GetPrefs();
205 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, 203 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS,
206 "http=1.1.1.1:80;" 204 "http=1.1.1.1:80;"
207 "https=socks5://2.2.2.2:1080;" 205 "https=socks5://2.2.2.2:1080;"
208 "ftp=3.3.3.3:9000;" 206 "ftp=3.3.3.3:9000;"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 "http=1.1.1.1:80", 250 "http=1.1.1.1:80",
253 "localhost,::1,foo.bar,<local>", 251 "localhost,::1,foo.bar,<local>",
254 kNoPac, 252 kNoPac,
255 pref_service); 253 pref_service);
256 } 254 }
257 255
258 // Tests error events. 256 // Tests error events.
259 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEvents) { 257 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEvents) {
260 ASSERT_TRUE(RunExtensionTest("proxy/events")) << message_; 258 ASSERT_TRUE(RunExtensionTest("proxy/events")) << message_;
261 } 259 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698