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

Unified Diff: util/win/process_info_test.cc

Issue 1428753009: win: crashpad_util_test ProcessInfo.Handles doesn't work with CONOUT$ (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | 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 a6f9dc1cebdc8b6068d5397576946212eae3d8de..7bf0f4efff96cc9ccf14274435f374101bd58e84 100644
--- a/util/win/process_info_test.cc
+++ b/util/win/process_info_test.cc
@@ -538,14 +538,16 @@ TEST(ProcessInfo, Handles) {
ASSERT_TRUE(file.is_valid());
SECURITY_ATTRIBUTES security_attributes = {0};
+ security_attributes.nLength = sizeof(security_attributes);
Mark Mentovai 2015/11/05 19:42:01 I originally thought that this would be the proble
security_attributes.bInheritHandle = true;
- ScopedFileHandle inherited_file(CreateFile(L"CONOUT$",
- GENERIC_WRITE,
- 0,
- &security_attributes,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- nullptr));
+ ScopedFileHandle inherited_file(CreateFile(
+ temp_dir.path().Append(FILE_PATH_LITERAL("inheritable")).value().c_str(),
+ GENERIC_WRITE,
+ 0,
+ &security_attributes,
+ CREATE_NEW,
+ FILE_ATTRIBUTE_NORMAL,
+ nullptr));
ASSERT_TRUE(inherited_file.is_valid());
HKEY key;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698