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

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

Issue 6990054: Disable setting incognito prefs for extensions for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'Effective' is gone 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
OLDNEW
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 "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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 "http=1.1.1.1:80;" 183 "http=1.1.1.1:80;"
184 "https=2.2.2.2:80;" 184 "https=2.2.2.2:80;"
185 "ftp=3.3.3.3:9000;" 185 "ftp=3.3.3.3:9000;"
186 "socks=socks4://4.4.4.4:9090", 186 "socks=socks4://4.4.4.4:9090",
187 kNoBypass, 187 kNoBypass,
188 kNoPac, 188 kNoPac,
189 pref_service); 189 pref_service);
190 } 190 }
191 191
192 // Tests setting values only for incognito mode 192 // Tests setting values only for incognito mode
193 // TODO(battre): re-enable when incognito is supported again
193 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, 194 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
194 ProxyFixedIndividualIncognitoOnly) { 195 DISABLED_ProxyFixedIndividualIncognitoOnly) {
195 CommandLine::ForCurrentProcess()->AppendSwitch( 196 CommandLine::ForCurrentProcess()->AppendSwitch(
196 switches::kEnableExperimentalExtensionApis); 197 switches::kEnableExperimentalExtensionApis);
197 198
198 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_only")) << 199 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_only")) <<
199 message_; 200 message_;
200 const Extension* extension = GetSingleLoadedExtension(); 201 const Extension* extension = GetSingleLoadedExtension();
201 ASSERT_TRUE(extension); 202 ASSERT_TRUE(extension);
202 203
203 PrefService* pref_service = browser()->profile()->GetPrefs(); 204 PrefService* pref_service = browser()->profile()->GetPrefs();
204 ExpectNoSettings(pref_service); 205 ExpectNoSettings(pref_service);
205 206
206 // Now check the incognito preferences. 207 // Now check the incognito preferences.
207 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs(); 208 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs();
208 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, 209 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS,
209 "http=1.1.1.1:80;" 210 "http=1.1.1.1:80;"
210 "https=socks5://2.2.2.2:1080;" 211 "https=socks5://2.2.2.2:1080;"
211 "ftp=3.3.3.3:9000;" 212 "ftp=3.3.3.3:9000;"
212 "socks=socks4://4.4.4.4:9090", 213 "socks=socks4://4.4.4.4:9090",
213 kNoBypass, 214 kNoBypass,
214 kNoPac, 215 kNoPac,
215 pref_service); 216 pref_service);
216 } 217 }
217 218
218 // Tests setting values also for incognito mode 219 // Tests setting values also for incognito mode
220 // TODO(battre): re-enable when incognito is supported again
219 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, 221 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
220 ProxyFixedIndividualIncognitoAlso) { 222 DISABLED_ProxyFixedIndividualIncognitoAlso) {
221 CommandLine::ForCurrentProcess()->AppendSwitch( 223 CommandLine::ForCurrentProcess()->AppendSwitch(
222 switches::kEnableExperimentalExtensionApis); 224 switches::kEnableExperimentalExtensionApis);
223 225
224 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_also")) << 226 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual_incognito_also")) <<
225 message_; 227 message_;
226 const Extension* extension = GetSingleLoadedExtension(); 228 const Extension* extension = GetSingleLoadedExtension();
227 ASSERT_TRUE(extension); 229 ASSERT_TRUE(extension);
228 230
229 PrefService* pref_service = browser()->profile()->GetPrefs(); 231 PrefService* pref_service = browser()->profile()->GetPrefs();
230 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, 232 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 pref_service); 288 pref_service);
287 } 289 }
288 290
289 // Tests error events. 291 // Tests error events.
290 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEvents) { 292 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEvents) {
291 CommandLine::ForCurrentProcess()->AppendSwitch( 293 CommandLine::ForCurrentProcess()->AppendSwitch(
292 switches::kEnableExperimentalExtensionApis); 294 switches::kEnableExperimentalExtensionApis);
293 295
294 ASSERT_TRUE(RunExtensionTest("proxy/events")) << message_; 296 ASSERT_TRUE(RunExtensionTest("proxy/events")) << message_;
295 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698