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

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

Issue 434026: disable extension toolstrips by default, adding (Closed)
Patch Set: fix a failing test Created 11 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
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Drop our reference to ExtensionsService now, so that it can be destroyed 213 // Drop our reference to ExtensionsService now, so that it can be destroyed
214 // while ChromeThreads and MessageLoop are still around (they are used 214 // while ChromeThreads and MessageLoop are still around (they are used
215 // in the ExtensionsService destruction process). 215 // in the ExtensionsService destruction process).
216 service_ = NULL; 216 service_ = NULL;
217 } 217 }
218 218
219 virtual void InitializeExtensionsService(const FilePath& pref_file, 219 virtual void InitializeExtensionsService(const FilePath& pref_file,
220 const FilePath& extensions_install_dir) { 220 const FilePath& extensions_install_dir) {
221 prefs_.reset(new PrefService(pref_file)); 221 prefs_.reset(new PrefService(pref_file));
222 profile_.reset(new TestingProfile()); 222 profile_.reset(new TestingProfile());
223
224 CommandLine::ForCurrentProcess()->AppendSwitch(
225 switches::kEnableExtensionToolstrips);
223 service_ = new ExtensionsService(profile_.get(), 226 service_ = new ExtensionsService(profile_.get(),
224 CommandLine::ForCurrentProcess(), 227 CommandLine::ForCurrentProcess(),
225 prefs_.get(), 228 prefs_.get(),
226 extensions_install_dir, 229 extensions_install_dir,
227 false); 230 false);
228 service_->set_extensions_enabled(true); 231 service_->set_extensions_enabled(true);
229 service_->set_show_extensions_prompts(false); 232 service_->set_show_extensions_prompts(false);
230 233
231 // When we start up, we want to make sure there is no external provider, 234 // When we start up, we want to make sure there is no external provider,
232 // since the ExtensionService on Windows will use the Registry as a default 235 // since the ExtensionService on Windows will use the Registry as a default
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1595
1593 recorder.set_ready(false); 1596 recorder.set_ready(false);
1594 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); 1597 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY));
1595 service = new ExtensionsService(&profile, command_line.get(), 1598 service = new ExtensionsService(&profile, command_line.get(),
1596 profile.GetPrefs(), install_dir, false); 1599 profile.GetPrefs(), install_dir, false);
1597 EXPECT_FALSE(service->extensions_enabled()); 1600 EXPECT_FALSE(service->extensions_enabled());
1598 service->Init(); 1601 service->Init();
1599 loop.RunAllPending(); 1602 loop.RunAllPending();
1600 EXPECT_TRUE(recorder.ready()); 1603 EXPECT_TRUE(recorder.ready());
1601 } 1604 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698