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

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

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 20 matching lines...) Expand all
31 31
32 class ExtensionStartupTestBase : public InProcessBrowserTest { 32 class ExtensionStartupTestBase : public InProcessBrowserTest {
33 public: 33 public:
34 ExtensionStartupTestBase() : enable_extensions_(false) { 34 ExtensionStartupTestBase() : enable_extensions_(false) {
35 num_expected_extensions_ = 3; 35 num_expected_extensions_ = 3;
36 } 36 }
37 37
38 protected: 38 protected:
39 // InProcessBrowserTest 39 // InProcessBrowserTest
40 virtual void SetUpCommandLine(CommandLine* command_line) { 40 virtual void SetUpCommandLine(CommandLine* command_line) {
41 EnableDOMAutomation();
42
43 if (!enable_extensions_) 41 if (!enable_extensions_)
44 command_line->AppendSwitch(switches::kDisableExtensions); 42 command_line->AppendSwitch(switches::kDisableExtensions);
45 43
46 if (!load_extensions_.empty()) { 44 if (!load_extensions_.empty()) {
47 FilePath::StringType paths = JoinString(load_extensions_, ','); 45 FilePath::StringType paths = JoinString(load_extensions_, ',');
48 command_line->AppendSwitchNative(switches::kLoadExtension, 46 command_line->AppendSwitchNative(switches::kLoadExtension,
49 paths); 47 paths);
50 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck); 48 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck);
51 } 49 }
52 } 50 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 .AppendASCII("extensions") 260 .AppendASCII("extensions")
263 .AppendASCII("app2"); 261 .AppendASCII("app2");
264 load_extensions_.push_back(fourth_extension_path.value()); 262 load_extensions_.push_back(fourth_extension_path.value());
265 } 263 }
266 }; 264 };
267 265
268 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { 266 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) {
269 WaitForServicesToStart(4, true); 267 WaitForServicesToStart(4, true);
270 TestInjection(true, true); 268 TestInjection(true, true);
271 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698