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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 fprintf(stdout, | 509 fprintf(stdout, |
510 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n" | 510 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n" |
511 "For debugging a test inside a debugger, use the\n" | 511 "For debugging a test inside a debugger, use the\n" |
512 "--gtest_filter=<your_test_name> flag along with either\n" | 512 "--gtest_filter=<your_test_name> flag along with either\n" |
513 "--single_process (to run the test in one launcher/browser process) or\n" | 513 "--single_process (to run the test in one launcher/browser process) or\n" |
514 "--single-process (to do the above, and also run Chrome in single-" | 514 "--single-process (to do the above, and also run Chrome in single-" |
515 "process mode).\n"); | 515 "process mode).\n"); |
516 | 516 |
517 base::MessageLoopForIO message_loop; | 517 base::MessageLoopForIO message_loop; |
518 | 518 |
| 519 // Allow the |launcher_delegate| to modify |default_jobs|. |
| 520 launcher_delegate->AdjustDefaultParallelJobs(&default_jobs); |
| 521 |
519 WrapperTestLauncherDelegate delegate(launcher_delegate); | 522 WrapperTestLauncherDelegate delegate(launcher_delegate); |
520 base::TestLauncher launcher(&delegate, default_jobs); | 523 base::TestLauncher launcher(&delegate, default_jobs); |
521 bool success = launcher.Run(argc, argv); | 524 bool success = launcher.Run(argc, argv); |
522 return (success ? 0 : 1); | 525 return (success ? 0 : 1); |
523 } | 526 } |
524 | 527 |
525 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 528 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
526 return g_launcher_delegate; | 529 return g_launcher_delegate; |
527 } | 530 } |
528 | 531 |
529 } // namespace content | 532 } // namespace content |
OLD | NEW |