Chromium Code Reviews

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/scoped_nsobject.h" 6 #include "base/scoped_nsobject.h"
7 #include "chrome/browser/extensions/extension_pref_store.h" 7 #include "chrome/browser/extensions/extension_pref_store.h"
8 #include "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 12 matching lines...)
23 return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName); 23 return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName);
24 } 24 }
25 25
26 void InitExtensionProfile() { 26 void InitExtensionProfile() {
27 DCHECK(!GetExtensionProcessManager()); 27 DCHECK(!GetExtensionProcessManager());
28 DCHECK(!GetExtensionService()); 28 DCHECK(!GetExtensionService());
29 29
30 manager_.reset(ExtensionProcessManager::Create(this)); 30 manager_.reset(ExtensionProcessManager::Create(this));
31 ExtensionPrefStore* pref_store = new ExtensionPrefStore; 31 ExtensionPrefStore* pref_store = new ExtensionPrefStore;
32 extension_prefs_.reset(new ExtensionPrefs(GetPrefs(), 32 extension_prefs_.reset(new ExtensionPrefs(GetPrefs(),
33 NULL,
Mattias Nissler (ping if slow) 2010/12/22 12:09:03 Is this safe?
battre 2010/12/22 18:34:53 Yes. The Popup Controller unittest does not requir
33 GetExtensionsInstallDir(), 34 GetExtensionsInstallDir(),
34 pref_store)); 35 pref_store,
36 NULL));
35 service_ = new ExtensionService(this, 37 service_ = new ExtensionService(this,
36 CommandLine::ForCurrentProcess(), 38 CommandLine::ForCurrentProcess(),
37 GetExtensionsInstallDir(), 39 GetExtensionsInstallDir(),
38 extension_prefs_.get(), 40 extension_prefs_.get(),
39 false); 41 false);
40 service_->set_extensions_enabled(true); 42 service_->set_extensions_enabled(true);
41 service_->set_show_extensions_prompts(false); 43 service_->set_show_extensions_prompts(false);
42 service_->ClearProvidersForTesting(); 44 service_->ClearProvidersForTesting();
43 service_->Init(); 45 service_->Init();
44 } 46 }
(...skipping 45 matching lines...)
90 }; 92 };
91 93
92 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) { 94 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) {
93 // TODO(andybons): Better mechanisms for mocking out the extensions service 95 // TODO(andybons): Better mechanisms for mocking out the extensions service
94 // and extensions for easy testing need to be implemented. 96 // and extensions for easy testing need to be implemented.
95 // http://crbug.com/28316 97 // http://crbug.com/28316
96 EXPECT_TRUE([ExtensionPopupController popup]); 98 EXPECT_TRUE([ExtensionPopupController popup]);
97 } 99 }
98 100
99 } // namespace 101 } // namespace
OLDNEW

Powered by Google App Engine