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

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

Issue 190010: Revert 24846 - Enable extensions by default.... (Closed) Base URL: svn://chrome-svn/chrome/branches/205/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_startup_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 21 matching lines...) Expand all
32 32
33 // Base class for extension browser tests. Provides utilities for loading, 33 // Base class for extension browser tests. Provides utilities for loading,
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 command_line->AppendSwitch(switches::kEnableExtensions);
43
42 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); 44 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
43 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); 45 test_data_dir_ = test_data_dir_.AppendASCII("extensions");
44 } 46 }
45 47
46 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) { 48 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) {
47 ExtensionsService* service = browser()->profile()->GetExtensionsService(); 49 ExtensionsService* service = browser()->profile()->GetExtensionsService();
48 size_t num_before = service->extensions()->size(); 50 size_t num_before = service->extensions()->size();
49 { 51 {
50 NotificationRegistrar registrar; 52 NotificationRegistrar registrar;
51 registrar.Add(this, NotificationType::EXTENSION_LOADED, 53 registrar.Add(this, NotificationType::EXTENSION_LOADED,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 case NotificationType::EXTENSION_HOST_DID_STOP_LOADING: 185 case NotificationType::EXTENSION_HOST_DID_STOP_LOADING:
184 std::cout << "Got EXTENSION_HOST_DID_STOP_LOADING notification.\n"; 186 std::cout << "Got EXTENSION_HOST_DID_STOP_LOADING notification.\n";
185 MessageLoopForUI::current()->Quit(); 187 MessageLoopForUI::current()->Quit();
186 break; 188 break;
187 189
188 default: 190 default:
189 NOTREACHED(); 191 NOTREACHED();
190 break; 192 break;
191 } 193 }
192 } 194 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698