| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // tests that don't run automatically but are still in the same test binary. | 57 // tests that don't run automatically but are still in the same test binary. |
| 58 // This is useful so that a team that wants to run a few tests doesn't have to | 58 // This is useful so that a team that wants to run a few tests doesn't have to |
| 59 // add a new binary that must be compiled on all builds. | 59 // add a new binary that must be compiled on all builds. |
| 60 const char kManualTestPrefix[] = "MANUAL_"; | 60 const char kManualTestPrefix[] = "MANUAL_"; |
| 61 | 61 |
| 62 TestLauncherDelegate* g_launcher_delegate; | 62 TestLauncherDelegate* g_launcher_delegate; |
| 63 ContentMainParams* g_params; | 63 ContentMainParams* g_params; |
| 64 | 64 |
| 65 std::string RemoveAnyPrePrefixes(const std::string& test_name) { | 65 std::string RemoveAnyPrePrefixes(const std::string& test_name) { |
| 66 std::string result(test_name); | 66 std::string result(test_name); |
| 67 ReplaceSubstringsAfterOffset(&result, 0, kPreTestPrefix, std::string()); | 67 base::ReplaceSubstringsAfterOffset( |
| 68 &result, 0, kPreTestPrefix, base::StringPiece()); |
| 68 return result; | 69 return result; |
| 69 } | 70 } |
| 70 | 71 |
| 71 void PrintUsage() { | 72 void PrintUsage() { |
| 72 fprintf(stdout, | 73 fprintf(stdout, |
| 73 "Runs tests using the gtest framework, each batch of tests being\n" | 74 "Runs tests using the gtest framework, each batch of tests being\n" |
| 74 "run in their own process. Supported command-line flags:\n" | 75 "run in their own process. Supported command-line flags:\n" |
| 75 "\n" | 76 "\n" |
| 76 " Common flags:\n" | 77 " Common flags:\n" |
| 77 " --gtest_filter=...\n" | 78 " --gtest_filter=...\n" |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 507 |
| 507 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 508 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
| 508 return g_launcher_delegate; | 509 return g_launcher_delegate; |
| 509 } | 510 } |
| 510 | 511 |
| 511 ContentMainParams* GetContentMainParams() { | 512 ContentMainParams* GetContentMainParams() { |
| 512 return g_params; | 513 return g_params; |
| 513 } | 514 } |
| 514 | 515 |
| 515 } // namespace content | 516 } // namespace content |
| OLD | NEW |