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