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

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

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/json/json_file_value_serializer.h" 6 #include "base/json/json_file_value_serializer.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 11 matching lines...) Expand all
22 class ExtensionUITest : public testing::Test { 22 class ExtensionUITest : public testing::Test {
23 public: 23 public:
24 ExtensionUITest() : ui_thread_(content::BrowserThread::UI, &message_loop_) { 24 ExtensionUITest() : ui_thread_(content::BrowserThread::UI, &message_loop_) {
25 } 25 }
26 26
27 protected: 27 protected:
28 void SetUp() { 28 void SetUp() {
29 // Create an ExtensionService and ManagementPolicy to inject into the 29 // Create an ExtensionService and ManagementPolicy to inject into the
30 // ExtensionSettingsHandler. 30 // ExtensionSettingsHandler.
31 TestExtensionSystem* system = static_cast<TestExtensionSystem*>( 31 TestExtensionSystem* system = static_cast<TestExtensionSystem*>(
32 ExtensionSystem::Get(&profile_)); 32 extensions::ExtensionSystem::Get(&profile_));
33 extension_service_ = system->CreateExtensionService( 33 extension_service_ = system->CreateExtensionService(
34 CommandLine::ForCurrentProcess(), FilePath(), false); 34 CommandLine::ForCurrentProcess(), FilePath(), false);
35 management_policy_ = system->CreateManagementPolicy(); 35 management_policy_ = system->CreateManagementPolicy();
36 36
37 handler_.reset(new ExtensionSettingsHandler(extension_service_, 37 handler_.reset(new ExtensionSettingsHandler(extension_service_,
38 management_policy_)); 38 management_policy_));
39 } 39 }
40 40
41 static DictionaryValue* DeserializeJSONTestData(const FilePath& path, 41 static DictionaryValue* DeserializeJSONTestData(const FilePath& path,
42 std::string *error) { 42 std::string *error) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 scoped_ptr<DictionaryValue> extension_details( 255 scoped_ptr<DictionaryValue> extension_details(
256 CreateExtensionDetailViewFromPath( 256 CreateExtensionDetailViewFromPath(
257 extension_path, pages, Extension::LOAD)); 257 extension_path, pages, Extension::LOAD));
258 258
259 FilePath::StringType ui_path; 259 FilePath::StringType ui_path;
260 260
261 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); 261 EXPECT_TRUE(extension_details->GetString("path", &ui_path));
262 EXPECT_EQ(extension_path, FilePath(ui_path)); 262 EXPECT_EQ(extension_path, FilePath(ui_path));
263 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698