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

Unified Diff: content/public/test/test_launcher.cc

Issue 59623015: GTTF: Flip test launcher defaults (developer mode is now default) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/test_launcher.cc
diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc
index 2fdc2a2ba90e97f131f0afd763b8d099f7fddb84..de0553871f2234097dcbfce7b7f815095e7b9bcf 100644
--- a/content/public/test/test_launcher.cc
+++ b/content/public/test/test_launcher.cc
@@ -399,20 +399,6 @@ void WrapperTestLauncherDelegate::GTestCallback(
test_launcher->OnTestFinished(result);
}
-bool GetSwitchValueAsInt(const std::string& switch_name, int* result) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switch_name))
- return true;
-
- std::string switch_value =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switch_name);
- if (!base::StringToInt(switch_value, result) || *result < 1) {
- LOG(ERROR) << "Invalid value for " << switch_name << ": " << switch_value;
- return false;
- }
-
- return true;
-}
-
} // namespace
const char kHelpFlag[] = "help";
@@ -495,23 +481,18 @@ int LaunchTests(TestLauncherDelegate* launcher_delegate,
testing::InitGoogleTest(&argc, argv);
TestTimeouts::Initialize();
- int jobs = default_jobs;
- if (!GetSwitchValueAsInt(switches::kTestLauncherJobs, &jobs))
- return 1;
-
fprintf(stdout,
- "Starting tests (using %d parallel jobs)...\n"
"IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n"
"For debugging a test inside a debugger, use the\n"
"--gtest_filter=<your_test_name> flag along with either\n"
"--single_process (to run the test in one launcher/browser process) or\n"
"--single-process (to do the above, and also run Chrome in single-"
- "process mode).\n", jobs);
+ "process mode).\n");
base::MessageLoopForIO message_loop;
WrapperTestLauncherDelegate delegate(launcher_delegate);
- base::TestLauncher launcher(&delegate, jobs);
+ base::TestLauncher launcher(&delegate, default_jobs);
bool success = launcher.Run(argc, argv);
return (success ? 0 : 1);
}
« no previous file with comments | « content/content_browsertests.isolate ('k') | third_party/cacheinvalidation/cacheinvalidation_unittests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698