| 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 "content/public/test/test_launcher.h" | 5 #include "content/public/test/test_launcher.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 std::vector<base::SplitTestName>* output) { | 175 std::vector<base::SplitTestName>* output) { |
| 176 *output = base::GetCompiledInTests(); | 176 *output = base::GetCompiledInTests(); |
| 177 return true; | 177 return true; |
| 178 } | 178 } |
| 179 | 179 |
| 180 bool WrapperTestLauncherDelegate::ShouldRunTest( | 180 bool WrapperTestLauncherDelegate::ShouldRunTest( |
| 181 const std::string& test_case_name, | 181 const std::string& test_case_name, |
| 182 const std::string& test_name) { | 182 const std::string& test_name) { |
| 183 all_test_names_.insert(test_case_name + "." + test_name); | 183 all_test_names_.insert(test_case_name + "." + test_name); |
| 184 | 184 |
| 185 if (StartsWithASCII(test_name, kManualTestPrefix, true) && | 185 if (base::StartsWithASCII(test_name, kManualTestPrefix, true) && |
| 186 !base::CommandLine::ForCurrentProcess()->HasSwitch(kRunManualTestsFlag)) { | 186 !base::CommandLine::ForCurrentProcess()->HasSwitch(kRunManualTestsFlag)) { |
| 187 return false; | 187 return false; |
| 188 } | 188 } |
| 189 | 189 |
| 190 if (StartsWithASCII(test_name, kPreTestPrefix, true)) { | 190 if (base::StartsWithASCII(test_name, kPreTestPrefix, true)) { |
| 191 // We will actually run PRE_ tests, but to ensure they run on the same shard | 191 // We will actually run PRE_ tests, but to ensure they run on the same shard |
| 192 // as dependent tests, handle all these details internally. | 192 // as dependent tests, handle all these details internally. |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 | 195 |
| 196 return true; | 196 return true; |
| 197 } | 197 } |
| 198 | 198 |
| 199 std::string GetPreTestName(const std::string& full_name) { | 199 std::string GetPreTestName(const std::string& full_name) { |
| 200 size_t dot_pos = full_name.find('.'); | 200 size_t dot_pos = full_name.find('.'); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 506 |
| 507 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 507 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
| 508 return g_launcher_delegate; | 508 return g_launcher_delegate; |
| 509 } | 509 } |
| 510 | 510 |
| 511 ContentMainParams* GetContentMainParams() { | 511 ContentMainParams* GetContentMainParams() { |
| 512 return g_params; | 512 return g_params; |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace content | 515 } // namespace content |
| OLD | NEW |