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 <set> | 10 #include <set> |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 const char kRunManualTestsFlag[] = "run-manual"; | 465 const char kRunManualTestsFlag[] = "run-manual"; |
466 | 466 |
467 const char kSingleProcessTestsFlag[] = "single_process"; | 467 const char kSingleProcessTestsFlag[] = "single_process"; |
468 | 468 |
469 scoped_ptr<TestState> TestLauncherDelegate::PreRunTest( | 469 scoped_ptr<TestState> TestLauncherDelegate::PreRunTest( |
470 base::CommandLine* command_line, | 470 base::CommandLine* command_line, |
471 base::TestLauncher::LaunchOptions* test_launch_options) { | 471 base::TestLauncher::LaunchOptions* test_launch_options) { |
472 return nullptr; | 472 return nullptr; |
473 } | 473 } |
474 | 474 |
| 475 void TestLauncherDelegate::OnDoneRunningTests() {} |
| 476 |
475 TestLauncherDelegate::~TestLauncherDelegate() { | 477 TestLauncherDelegate::~TestLauncherDelegate() { |
476 } | 478 } |
477 | 479 |
478 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 480 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
479 int default_jobs, | 481 int default_jobs, |
480 int argc, | 482 int argc, |
481 char** argv) { | 483 char** argv) { |
482 DCHECK(!g_launcher_delegate); | 484 DCHECK(!g_launcher_delegate); |
483 g_launcher_delegate = launcher_delegate; | 485 g_launcher_delegate = launcher_delegate; |
484 | 486 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 "--single-process (to do the above, and also run Chrome in single-" | 536 "--single-process (to do the above, and also run Chrome in single-" |
535 "process mode).\n"); | 537 "process mode).\n"); |
536 | 538 |
537 base::MessageLoopForIO message_loop; | 539 base::MessageLoopForIO message_loop; |
538 | 540 |
539 // Allow the |launcher_delegate| to modify |default_jobs|. | 541 // Allow the |launcher_delegate| to modify |default_jobs|. |
540 launcher_delegate->AdjustDefaultParallelJobs(&default_jobs); | 542 launcher_delegate->AdjustDefaultParallelJobs(&default_jobs); |
541 | 543 |
542 WrapperTestLauncherDelegate delegate(launcher_delegate); | 544 WrapperTestLauncherDelegate delegate(launcher_delegate); |
543 base::TestLauncher launcher(&delegate, default_jobs); | 545 base::TestLauncher launcher(&delegate, default_jobs); |
544 return (launcher.Run() ? 0 : 1); | 546 const int result = launcher.Run() ? 0 : 1; |
| 547 launcher_delegate->OnDoneRunningTests(); |
| 548 return result; |
545 } | 549 } |
546 | 550 |
547 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 551 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
548 return g_launcher_delegate; | 552 return g_launcher_delegate; |
549 } | 553 } |
550 | 554 |
551 ContentMainParams* GetContentMainParams() { | 555 ContentMainParams* GetContentMainParams() { |
552 return g_params; | 556 return g_params; |
553 } | 557 } |
554 | 558 |
555 } // namespace content | 559 } // namespace content |
OLD | NEW |