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

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

Issue 10704023: Moved ExtensionPrefs and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest-er master merged in Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/scoped_nsobject.h" 5 #include "base/memory/scoped_nsobject.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/extensions/extension_pref_value_map.h" 8 #include "chrome/browser/extensions/extension_pref_value_map.h"
9 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" 9 #include "chrome/browser/extensions/extension_pref_value_map_factory.h"
10 #include "chrome/browser/extensions/extension_prefs.h" 10 #include "chrome/browser/extensions/extension_prefs.h"
(...skipping 12 matching lines...) Expand all
23 23
24 FilePath GetExtensionsInstallDir() { 24 FilePath GetExtensionsInstallDir() {
25 return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName); 25 return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName);
26 } 26 }
27 27
28 void InitExtensionProfile() { 28 void InitExtensionProfile() {
29 DCHECK(!GetExtensionProcessManager()); 29 DCHECK(!GetExtensionProcessManager());
30 DCHECK(!GetExtensionService()); 30 DCHECK(!GetExtensionService());
31 31
32 manager_.reset(ExtensionProcessManager::Create(this)); 32 manager_.reset(ExtensionProcessManager::Create(this));
33 extension_prefs_.reset(new ExtensionPrefs( 33 extension_prefs_.reset(new extensions::ExtensionPrefs(
34 GetPrefs(), 34 GetPrefs(),
35 GetExtensionsInstallDir(), 35 GetExtensionsInstallDir(),
36 ExtensionPrefValueMapFactory::GetForProfile(this))); 36 ExtensionPrefValueMapFactory::GetForProfile(this)));
37 extension_prefs_->Init(false); 37 extension_prefs_->Init(false);
38 service_.reset(new ExtensionService(this, 38 service_.reset(new ExtensionService(this,
39 CommandLine::ForCurrentProcess(), 39 CommandLine::ForCurrentProcess(),
40 GetExtensionsInstallDir(), 40 GetExtensionsInstallDir(),
41 extension_prefs_.get(), 41 extension_prefs_.get(),
42 false, 42 false,
43 true)); 43 true));
(...skipping 12 matching lines...) Expand all
56 virtual ExtensionProcessManager* GetExtensionProcessManager() { 56 virtual ExtensionProcessManager* GetExtensionProcessManager() {
57 return manager_.get(); 57 return manager_.get();
58 } 58 }
59 59
60 virtual ExtensionService* GetExtensionService() { 60 virtual ExtensionService* GetExtensionService() {
61 return service_.get(); 61 return service_.get();
62 } 62 }
63 63
64 private: 64 private:
65 scoped_ptr<ExtensionProcessManager> manager_; 65 scoped_ptr<ExtensionProcessManager> manager_;
66 scoped_ptr<ExtensionPrefs> extension_prefs_; 66 scoped_ptr<extensions::ExtensionPrefs> extension_prefs_;
67 scoped_ptr<ExtensionService> service_; 67 scoped_ptr<ExtensionService> service_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(ExtensionTestingProfile); 69 DISALLOW_COPY_AND_ASSIGN(ExtensionTestingProfile);
70 }; 70 };
71 71
72 class ExtensionPopupControllerTest : public CocoaTest { 72 class ExtensionPopupControllerTest : public CocoaTest {
73 public: 73 public:
74 virtual void SetUp() { 74 virtual void SetUp() {
75 CocoaTest::SetUp(); 75 CocoaTest::SetUp();
76 profile_.reset(new ExtensionTestingProfile()); 76 profile_.reset(new ExtensionTestingProfile());
(...skipping 17 matching lines...) Expand all
94 }; 94 };
95 95
96 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) { 96 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) {
97 // TODO(andybons): Better mechanisms for mocking out the extensions service 97 // TODO(andybons): Better mechanisms for mocking out the extensions service
98 // and extensions for easy testing need to be implemented. 98 // and extensions for easy testing need to be implemented.
99 // http://crbug.com/28316 99 // http://crbug.com/28316
100 EXPECT_TRUE([ExtensionPopupController popup]); 100 EXPECT_TRUE([ExtensionPopupController popup]);
101 } 101 }
102 102
103 } // namespace 103 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/protector/protected_prefs_watcher_unittest.cc ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698