Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: util/win/process_info_test.cc

Issue 1352323002: win: Make reading NT_IMAGE_HEADERS work cross-bitness (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@cleanup-crashpad-info
Patch Set: . Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/win/child_launcher.cc ('K') | « test/win/child_launcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info_test.cc
diff --git a/util/win/process_info_test.cc b/util/win/process_info_test.cc
index de1d5295943135b66e3c384965d74a34d5a411f8..00b5606022457fad436dfe3a08e9e5f89369b4bb 100644
--- a/util/win/process_info_test.cc
+++ b/util/win/process_info_test.cc
@@ -22,6 +22,7 @@
#include "build/build_config.h"
#include "gtest/gtest.h"
#include "test/paths.h"
+#include "test/win/child_launcher.h"
#include "util/file/file_io.h"
#include "util/misc/uuid.h"
#include "util/win/scoped_handle.h"
@@ -128,30 +129,15 @@ void TestOtherProcess(const base::string16& directory_modification) {
L"_process_info_test_child.exe")
.value();
// TODO(scottmg): Command line escaping utility.
- std::wstring command_line = child_test_executable + L" " +
- started_uuid.ToString16() + L" " +
- done_uuid.ToString16();
- STARTUPINFO startup_info = {0};
- startup_info.cb = sizeof(startup_info);
- PROCESS_INFORMATION process_information;
- ASSERT_TRUE(CreateProcess(child_test_executable.c_str(),
- &command_line[0],
- nullptr,
- nullptr,
- false,
- 0,
- nullptr,
- nullptr,
- &startup_info,
- &process_information));
- // Take ownership of the two process handles returned.
- ScopedKernelHANDLE process_main_thread_handle(process_information.hThread);
- ScopedKernelHANDLE process_handle(process_information.hProcess);
+ ChildLauncher child(
+ child_test_executable,
+ started_uuid.ToString16() + L" " + done_uuid.ToString16());
+ child.Start();
// Wait until the test has completed initialization.
ASSERT_EQ(WaitForSingleObject(started.get(), INFINITE), WAIT_OBJECT_0);
- ASSERT_TRUE(process_info.Initialize(process_information.hProcess));
+ ASSERT_TRUE(process_info.Initialize(child.process_handle()));
// Tell the test it's OK to shut down now that we've read our data.
SetEvent(done.get());
« test/win/child_launcher.cc ('K') | « test/win/child_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698