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_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 command_line->AppendSwitchNative(switches::kLoadExtension, | 53 command_line->AppendSwitchNative(switches::kLoadExtension, |
54 paths); | 54 paths); |
55 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck); | 55 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 virtual bool SetUpUserDataDirectory() OVERRIDE { | 59 virtual bool SetUpUserDataDirectory() OVERRIDE { |
60 base::FilePath profile_dir; | 60 base::FilePath profile_dir; |
61 PathService::Get(chrome::DIR_USER_DATA, &profile_dir); | 61 PathService::Get(chrome::DIR_USER_DATA, &profile_dir); |
62 profile_dir = profile_dir.AppendASCII(TestingProfile::kTestUserProfileDir); | 62 profile_dir = profile_dir.AppendASCII(TestingProfile::kTestUserProfileDir); |
63 file_util::CreateDirectory(profile_dir); | 63 base::CreateDirectory(profile_dir); |
64 | 64 |
65 preferences_file_ = profile_dir.AppendASCII("Preferences"); | 65 preferences_file_ = profile_dir.AppendASCII("Preferences"); |
66 user_scripts_dir_ = profile_dir.AppendASCII("User Scripts"); | 66 user_scripts_dir_ = profile_dir.AppendASCII("User Scripts"); |
67 extensions_dir_ = profile_dir.AppendASCII("Extensions"); | 67 extensions_dir_ = profile_dir.AppendASCII("Extensions"); |
68 | 68 |
69 if (enable_extensions_ && load_extensions_.empty()) { | 69 if (enable_extensions_ && load_extensions_.empty()) { |
70 base::FilePath src_dir; | 70 base::FilePath src_dir; |
71 PathService::Get(chrome::DIR_TEST_DATA, &src_dir); | 71 PathService::Get(chrome::DIR_TEST_DATA, &src_dir); |
72 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); | 72 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); |
73 | 73 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 .AppendASCII("extensions") | 271 .AppendASCII("extensions") |
272 .AppendASCII("app2"); | 272 .AppendASCII("app2"); |
273 load_extensions_.push_back(fourth_extension_path.value()); | 273 load_extensions_.push_back(fourth_extension_path.value()); |
274 } | 274 } |
275 }; | 275 }; |
276 | 276 |
277 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { | 277 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { |
278 WaitForServicesToStart(4, true); | 278 WaitForServicesToStart(4, true); |
279 TestInjection(true, true); | 279 TestInjection(true, true); |
280 } | 280 } |
OLD | NEW |