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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.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 | « no previous file | chrome/browser/extensions/extensions_service_unittest.cc » ('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) 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 "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 23 matching lines...) Expand all
34 // unloading, and installing extensions. 34 // unloading, and installing extensions.
35 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { 35 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
36 // This enables DOM automation for tab contentses. 36 // This enables DOM automation for tab contentses.
37 EnableDOMAutomation(); 37 EnableDOMAutomation();
38 38
39 // This enables it for extension hosts. 39 // This enables it for extension hosts.
40 ExtensionHost::EnableDOMAutomation(); 40 ExtensionHost::EnableDOMAutomation();
41 41
42 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); 42 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
43 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); 43 test_data_dir_ = test_data_dir_.AppendASCII("extensions");
44
45 // There are a number of tests that still use toolstrips. Rather than
46 // selectively enabling each of them, enable toolstrips for all extension
47 // tests.
48 command_line->AppendSwitch(switches::kEnableExtensionToolstrips);
44 } 49 }
45 50
46 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) { 51 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) {
47 ExtensionsService* service = browser()->profile()->GetExtensionsService(); 52 ExtensionsService* service = browser()->profile()->GetExtensionsService();
48 size_t num_before = service->extensions()->size(); 53 size_t num_before = service->extensions()->size();
49 { 54 {
50 NotificationRegistrar registrar; 55 NotificationRegistrar registrar;
51 registrar.Add(this, NotificationType::EXTENSION_LOADED, 56 registrar.Add(this, NotificationType::EXTENSION_LOADED,
52 NotificationService::AllSources()); 57 NotificationService::AllSources());
53 service->LoadExtension(path); 58 service->LoadExtension(path);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 case NotificationType::EXTENSION_PROCESS_CREATED: 262 case NotificationType::EXTENSION_PROCESS_CREATED:
258 std::cout << "Got EXTENSION_PROCESS_CREATED notification.\n"; 263 std::cout << "Got EXTENSION_PROCESS_CREATED notification.\n";
259 MessageLoopForUI::current()->Quit(); 264 MessageLoopForUI::current()->Quit();
260 break; 265 break;
261 266
262 default: 267 default:
263 NOTREACHED(); 268 NOTREACHED();
264 break; 269 break;
265 } 270 }
266 } 271 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extensions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698