| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/crash/content/app/fallback_crash_handler_launcher_win.h" | 5 #include "components/crash/content/app/fallback_crash_handler_launcher_win.h" |
| 6 | 6 |
| 7 #include <dbghelp.h> | 7 #include <dbghelp.h> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 | 137 |
| 138 class FallbackCrashHandlerLauncherTest : public base::MultiProcessTest {}; | 138 class FallbackCrashHandlerLauncherTest : public base::MultiProcessTest {}; |
| 139 | 139 |
| 140 } // namespace | 140 } // namespace |
| 141 | 141 |
| 142 TEST_F(FallbackCrashHandlerLauncherTest, LaunchAndWaitForHandler) { | 142 TEST_F(FallbackCrashHandlerLauncherTest, LaunchAndWaitForHandler) { |
| 143 // Because this process is heavily multithreaded it's going to be flaky | 143 // Because this process is heavily multithreaded it's going to be flaky |
| 144 // and generally fraught with peril to try and grab a minidump of it. | 144 // and generally fraught with peril to try and grab a minidump of it. |
| 145 // Instead, fire off a sacrificial process to do the testing. | 145 // Instead, fire off a sacrificial process to do the testing. |
| 146 base::Process test_process = SpawnChild("TestCrashHandlerLauncherMain"); | 146 base::SpawnChildResult spawn_result = |
| 147 SpawnChild("TestCrashHandlerLauncherMain"); |
| 148 base::Process test_process = std::move(spawn_result.process); |
| 147 int exit_code = 0; | 149 int exit_code = 0; |
| 148 ASSERT_TRUE(test_process.WaitForExit(&exit_code)); | 150 ASSERT_TRUE(test_process.WaitForExit(&exit_code)); |
| 149 ASSERT_EQ(0, exit_code); | 151 ASSERT_EQ(0, exit_code); |
| 150 } | 152 } |
| 151 | 153 |
| 152 } // namespace crash_reporter | 154 } // namespace crash_reporter |
| OLD | NEW |