Chromium Code Reviews| Index: content/test/test_launcher.cc |
| =================================================================== |
| --- content/test/test_launcher.cc (revision 147044) |
| +++ content/test/test_launcher.cc (working copy) |
| @@ -41,6 +41,10 @@ |
| namespace test_launcher { |
| +namespace { |
| +TestLauncherDelegate* g_launcher_delegate; |
|
sky
2012/07/18 23:23:35
= NULL
jam
2012/07/18 23:44:06
that isn't necessary since it's initialized to NUL
|
| +} |
| + |
| // The environment variable name for the total number of test shards. |
| const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS"; |
| // The environment variable name for the test shard index. |
| @@ -573,6 +577,8 @@ |
| int LaunchTests(TestLauncherDelegate* launcher_delegate, |
| int argc, |
| char** argv) { |
| + DCHECK(!g_launcher_delegate); |
| + g_launcher_delegate = launcher_delegate; |
| launcher_delegate->EarlyInitialize(); |
| CommandLine::Init(argc, argv); |
| @@ -664,4 +670,8 @@ |
| return exit_code; |
| } |
| +TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
| + return g_launcher_delegate; |
| +} |
| + |
| } // namespace test_launcher |