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

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

Issue 315403006: Convert installer_util_unittests, sbox_integration_tests, sbox_validation_tests, sbox_unittests to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/run_all_unittests.cc ('k') | sandbox/win/sandbox_win.gypi » ('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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); 338 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests");
339 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name); 339 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name);
340 new_cmd_line.AppendSwitch(kSingleProcessTestsFlag); 340 new_cmd_line.AppendSwitch(kSingleProcessTestsFlag);
341 341
342 char* browser_wrapper = getenv("BROWSER_WRAPPER"); 342 char* browser_wrapper = getenv("BROWSER_WRAPPER");
343 343
344 test_launcher->LaunchChildGTestProcess( 344 test_launcher->LaunchChildGTestProcess(
345 new_cmd_line, 345 new_cmd_line,
346 browser_wrapper ? browser_wrapper : std::string(), 346 browser_wrapper ? browser_wrapper : std::string(),
347 TestTimeouts::action_max_timeout(), 347 TestTimeouts::action_max_timeout(),
348 true,
348 base::Bind(&WrapperTestLauncherDelegate::GTestCallback, 349 base::Bind(&WrapperTestLauncherDelegate::GTestCallback,
349 base::Unretained(this), 350 base::Unretained(this),
350 test_launcher, 351 test_launcher,
351 test_name)); 352 test_name));
352 } 353 }
353 354
354 void WrapperTestLauncherDelegate::RunDependentTest( 355 void WrapperTestLauncherDelegate::RunDependentTest(
355 base::TestLauncher* test_launcher, 356 base::TestLauncher* test_launcher,
356 const std::string test_name, 357 const std::string test_name,
357 const base::TestResult& pre_test_result) { 358 const base::TestResult& pre_test_result) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 "--single-process (to do the above, and also run Chrome in single-" 487 "--single-process (to do the above, and also run Chrome in single-"
487 "process mode).\n"); 488 "process mode).\n");
488 489
489 base::MessageLoopForIO message_loop; 490 base::MessageLoopForIO message_loop;
490 491
491 // Allow the |launcher_delegate| to modify |default_jobs|. 492 // Allow the |launcher_delegate| to modify |default_jobs|.
492 launcher_delegate->AdjustDefaultParallelJobs(&default_jobs); 493 launcher_delegate->AdjustDefaultParallelJobs(&default_jobs);
493 494
494 WrapperTestLauncherDelegate delegate(launcher_delegate); 495 WrapperTestLauncherDelegate delegate(launcher_delegate);
495 base::TestLauncher launcher(&delegate, default_jobs); 496 base::TestLauncher launcher(&delegate, default_jobs);
496 bool success = launcher.Run(argc, argv); 497 return (launcher.Run() ? 0 : 1);
497 return (success ? 0 : 1);
498 } 498 }
499 499
500 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { 500 TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
501 return g_launcher_delegate; 501 return g_launcher_delegate;
502 } 502 }
503 503
504 ContentMainParams* GetContentMainParams() { 504 ContentMainParams* GetContentMainParams() {
505 return g_params; 505 return g_params;
506 } 506 }
507 507
508 } // namespace content 508 } // namespace content
OLDNEW
« no previous file with comments | « chrome/installer/util/run_all_unittests.cc ('k') | sandbox/win/sandbox_win.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698