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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/gpu/gpu_info_collector.cc ('k') | content/renderer/browser_plugin/browser_plugin.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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 DCHECK(!command_line->HasSwitch(kGTestListTestsFlag)); 448 DCHECK(!command_line->HasSwitch(kGTestListTestsFlag));
449 449
450 testing::UnitTest* const unit_test = testing::UnitTest::GetInstance(); 450 testing::UnitTest* const unit_test = testing::UnitTest::GetInstance();
451 451
452 std::string filter = command_line->GetSwitchValueASCII(kGTestFilterFlag); 452 std::string filter = command_line->GetSwitchValueASCII(kGTestFilterFlag);
453 453
454 // Split --gtest_filter at '-', if there is one, to separate into 454 // Split --gtest_filter at '-', if there is one, to separate into
455 // positive filter and negative filter portions. 455 // positive filter and negative filter portions.
456 std::string positive_filter = filter; 456 std::string positive_filter = filter;
457 std::string negative_filter = ""; 457 std::string negative_filter;
458 size_t dash_pos = filter.find('-'); 458 size_t dash_pos = filter.find('-');
459 if (dash_pos != std::string::npos) { 459 if (dash_pos != std::string::npos) {
460 positive_filter = filter.substr(0, dash_pos); // Everything up to the dash. 460 positive_filter = filter.substr(0, dash_pos); // Everything up to the dash.
461 negative_filter = filter.substr(dash_pos + 1); // Everything after the dash. 461 negative_filter = filter.substr(dash_pos + 1); // Everything after the dash.
462 } 462 }
463 463
464 int num_runnable_tests = 0; 464 int num_runnable_tests = 0;
465 int test_run_count = 0; 465 int test_run_count = 0;
466 int timeout_count = 0; 466 int timeout_count = 0;
467 std::vector<std::string> failed_tests; 467 std::vector<std::string> failed_tests;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 cycles--; 744 cycles--;
745 } 745 }
746 return exit_code; 746 return exit_code;
747 } 747 }
748 748
749 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { 749 TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
750 return g_launcher_delegate; 750 return g_launcher_delegate;
751 } 751 }
752 752
753 } // namespace content 753 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_info_collector.cc ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698