diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/reliability/run_all_unittests.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome_frame/test/reliability/run_all_unittests.cc b/chrome_frame/test/reliability/run_all_unittests.cc index d5b42da..418caee 100644 --- a/chrome_frame/test/reliability/run_all_unittests.cc +++ b/chrome_frame/test/reliability/run_all_unittests.cc @@ -13,13 +13,6 @@ static const char kRegisterDllFlag[] = "register"; int main(int argc, char **argv) { - - // If --register is passed, then we need to ensure that Chrome Frame is - // registered before starting up the reliability tests. - CommandLine::Init(argc, argv); - CommandLine* cmd_line = CommandLine::ForCurrentProcess(); - DCHECK(cmd_line); - // We create this slightly early as it is the one who instantiates THE // AtExitManager which some of the other stuff below relies on. ReliabilityTestSuite test_suite(argc, argv); @@ -28,6 +21,14 @@ int main(int argc, char **argv) { base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); int result = -1; + // If --register is passed, then we need to ensure that Chrome Frame is + // registered before starting up the reliability tests. + CommandLine* cmd_line = CommandLine::ForCurrentProcess(); + DCHECK(cmd_line); + if (!cmd_line) { + NOTREACHED() << "CommandLine object not initialized"; + return result; + } if (cmd_line->HasSwitch(kRegisterDllFlag)) { std::wstring dll_path = cmd_line->GetSwitchValueNative(kRegisterDllFlag); |