OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |