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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_web_ui.h" 8 #include "chrome/browser/extensions/extension_web_ui.h"
9 #include "chrome/browser/extensions/test_extension_system.h" 9 #include "chrome/browser/extensions/test_extension_system.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 ExtensionWebUITest() 28 ExtensionWebUITest()
29 : ui_thread_(content::BrowserThread::UI, &message_loop_) {} 29 : ui_thread_(content::BrowserThread::UI, &message_loop_) {}
30 30
31 protected: 31 protected:
32 void SetUp() override { 32 void SetUp() override {
33 profile_.reset(new TestingProfile()); 33 profile_.reset(new TestingProfile());
34 TestExtensionSystem* system = 34 TestExtensionSystem* system =
35 static_cast<TestExtensionSystem*>(ExtensionSystem::Get(profile_.get())); 35 static_cast<TestExtensionSystem*>(ExtensionSystem::Get(profile_.get()));
36 extension_service_ = system->CreateExtensionService( 36 extension_service_ = system->CreateExtensionService(
37 CommandLine::ForCurrentProcess(), base::FilePath(), false); 37 base::CommandLine::ForCurrentProcess(), base::FilePath(), false);
38 } 38 }
39 39
40 void TearDown() override { 40 void TearDown() override {
41 profile_.reset(); 41 profile_.reset();
42 message_loop_.RunUntilIdle(); 42 message_loop_.RunUntilIdle();
43 } 43 }
44 44
45 scoped_ptr<TestingProfile> profile_; 45 scoped_ptr<TestingProfile> profile_;
46 ExtensionService* extension_service_; 46 ExtensionService* extension_service_;
47 base::MessageLoop message_loop_; 47 base::MessageLoop message_loop_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // This time the non-component extension was registered more recently and 110 // This time the non-component extension was registered more recently and
111 // should still take precedence. 111 // should still take precedence.
112 ExtensionWebUI::RegisterChromeURLOverrides( 112 ExtensionWebUI::RegisterChromeURLOverrides(
113 profile_.get(), URLOverrides::GetChromeURLOverrides(ext_unpacked.get())); 113 profile_.get(), URLOverrides::GetChromeURLOverrides(ext_unpacked.get()));
114 url = GURL("chrome://bookmarks"); 114 url = GURL("chrome://bookmarks");
115 EXPECT_TRUE(ExtensionWebUI::HandleChromeURLOverride(&url, profile_.get())); 115 EXPECT_TRUE(ExtensionWebUI::HandleChromeURLOverride(&url, profile_.get()));
116 EXPECT_EQ(url, expected_unpacked_override_url); 116 EXPECT_EQ(url, expected_unpacked_override_url);
117 } 117 }
118 118
119 } // namespace extensions 119 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/extensions/external_component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698