Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: content/public/test/test_launcher.cc

Issue 1200393002: Add more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string
Patch Set: Android Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/appcache_interfaces.cc ('k') | content/test/net/url_request_abort_on_end_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/appcache_interfaces.cc ('k') | content/test/net/url_request_abort_on_end_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698