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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); | 90 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); |
91 | 91 |
92 base::CopyFile(src_dir.Append(chrome::kPreferencesFilename), | 92 base::CopyFile(src_dir.Append(chrome::kPreferencesFilename), |
93 preferences_file_); | 93 preferences_file_); |
94 base::CopyDirectory(src_dir.AppendASCII("Extensions"), | 94 base::CopyDirectory(src_dir.AppendASCII("Extensions"), |
95 profile_dir, true); // recursive | 95 profile_dir, true); // recursive |
96 } | 96 } |
97 return true; | 97 return true; |
98 } | 98 } |
99 | 99 |
| 100 void SetUpInProcessBrowserTestFixture() override { |
| 101 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 102 |
| 103 // Bots are on a domain, turn off the domain check for settings hardening in |
| 104 // order to be able to test all SettingsEnforcement groups. |
| 105 chrome_prefs::DisableDomainCheckForTesting(); |
| 106 } |
| 107 |
100 void TearDown() override { | 108 void TearDown() override { |
101 EXPECT_TRUE(base::DeleteFile(preferences_file_, false)); | 109 EXPECT_TRUE(base::DeleteFile(preferences_file_, false)); |
102 | 110 |
103 // TODO(phajdan.jr): Check return values of the functions below, carefully. | 111 // TODO(phajdan.jr): Check return values of the functions below, carefully. |
104 base::DeleteFile(user_scripts_dir_, true); | 112 base::DeleteFile(user_scripts_dir_, true); |
105 base::DeleteFile(extensions_dir_, true); | 113 base::DeleteFile(extensions_dir_, true); |
106 | 114 |
107 InProcessBrowserTest::TearDown(); | 115 InProcessBrowserTest::TearDown(); |
108 } | 116 } |
109 | 117 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 .AppendASCII("extensions") | 303 .AppendASCII("extensions") |
296 .AppendASCII("app2"); | 304 .AppendASCII("app2"); |
297 load_extensions_.push_back(fourth_extension_path.value()); | 305 load_extensions_.push_back(fourth_extension_path.value()); |
298 } | 306 } |
299 }; | 307 }; |
300 | 308 |
301 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { | 309 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { |
302 WaitForServicesToStart(4, true); | 310 WaitForServicesToStart(4, true); |
303 TestInjection(true, true); | 311 TestInjection(true, true); |
304 } | 312 } |
OLD | NEW |