| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // profile. i.e. Foo.PRE_Test runs and then Foo.Test. This allows writing tests | 61 // profile. i.e. Foo.PRE_Test runs and then Foo.Test. This allows writing tests |
| 62 // that span browser restarts. | 62 // that span browser restarts. |
| 63 const char kPreTestPrefix[] = "PRE_"; | 63 const char kPreTestPrefix[] = "PRE_"; |
| 64 | 64 |
| 65 // Manual tests only run when --run-manual is specified. This allows writing | 65 // Manual tests only run when --run-manual is specified. This allows writing |
| 66 // tests that don't run automatically but are still in the same test binary. | 66 // tests that don't run automatically but are still in the same test binary. |
| 67 // This is useful so that a team that wants to run a few tests doesn't have to | 67 // This is useful so that a team that wants to run a few tests doesn't have to |
| 68 // add a new binary that must be compiled on all builds. | 68 // add a new binary that must be compiled on all builds. |
| 69 const char kManualTestPrefix[] = "MANUAL_"; | 69 const char kManualTestPrefix[] = "MANUAL_"; |
| 70 | 70 |
| 71 TestLauncherDelegate* g_launcher_delegate; | 71 TestLauncherDelegate* g_launcher_delegate = nullptr; |
| 72 ContentMainParams* g_params; | 72 ContentMainParams* g_params = nullptr; |
| 73 | 73 |
| 74 std::string RemoveAnyPrePrefixes(const std::string& test_name) { | 74 std::string RemoveAnyPrePrefixes(const std::string& test_name) { |
| 75 std::string result(test_name); | 75 std::string result(test_name); |
| 76 base::ReplaceSubstringsAfterOffset( | 76 base::ReplaceSubstringsAfterOffset( |
| 77 &result, 0, kPreTestPrefix, base::StringPiece()); | 77 &result, 0, kPreTestPrefix, base::StringPiece()); |
| 78 return result; | 78 return result; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void PrintUsage() { | 81 void PrintUsage() { |
| 82 fprintf(stdout, | 82 fprintf(stdout, |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 556 |
| 557 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 557 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
| 558 return g_launcher_delegate; | 558 return g_launcher_delegate; |
| 559 } | 559 } |
| 560 | 560 |
| 561 ContentMainParams* GetContentMainParams() { | 561 ContentMainParams* GetContentMainParams() { |
| 562 return g_params; | 562 return g_params; |
| 563 } | 563 } |
| 564 | 564 |
| 565 } // namespace content | 565 } // namespace content |
| OLD | NEW |