| 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/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // into the services, so we didn't start correctly. | 43 // into the services, so we didn't start correctly. |
| 44 | 44 |
| 45 class ExtensionStartupTestBase : public InProcessBrowserTest { | 45 class ExtensionStartupTestBase : public InProcessBrowserTest { |
| 46 public: | 46 public: |
| 47 ExtensionStartupTestBase() : unauthenticated_load_allowed_(true) { | 47 ExtensionStartupTestBase() : unauthenticated_load_allowed_(true) { |
| 48 num_expected_extensions_ = 3; | 48 num_expected_extensions_ = 3; |
| 49 } | 49 } |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 // InProcessBrowserTest | 52 // InProcessBrowserTest |
| 53 void SetUpCommandLine(CommandLine* command_line) override { | 53 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 54 if (load_extensions_.empty()) { | 54 if (load_extensions_.empty()) { |
| 55 // If no |load_extensions_| were specified, allow unauthenticated | 55 // If no |load_extensions_| were specified, allow unauthenticated |
| 56 // extension settings to be loaded from Preferences as if they had been | 56 // extension settings to be loaded from Preferences as if they had been |
| 57 // authenticated correctly before they were handed to the ExtensionSystem. | 57 // authenticated correctly before they were handed to the ExtensionSystem. |
| 58 command_line->AppendSwitchASCII( | 58 command_line->AppendSwitchASCII( |
| 59 switches::kForceFieldTrials, | 59 switches::kForceFieldTrials, |
| 60 base::StringPrintf( | 60 base::StringPrintf( |
| 61 "%s/%s/", | 61 "%s/%s/", |
| 62 chrome_prefs::internals::kSettingsEnforcementTrialName, | 62 chrome_prefs::internals::kSettingsEnforcementTrialName, |
| 63 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement)); | 63 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement)); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 .AppendASCII("extensions") | 295 .AppendASCII("extensions") |
| 296 .AppendASCII("app2"); | 296 .AppendASCII("app2"); |
| 297 load_extensions_.push_back(fourth_extension_path.value()); | 297 load_extensions_.push_back(fourth_extension_path.value()); |
| 298 } | 298 } |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { | 301 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { |
| 302 WaitForServicesToStart(4, true); | 302 WaitForServicesToStart(4, true); |
| 303 TestInjection(true, true); | 303 TestInjection(true, true); |
| 304 } | 304 } |
| OLD | NEW |