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

Unified Diff: util/win/process_info_test.cc

Issue 1339813002: win: Fix ProcessInfo test when running on x86 host OS (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@fix-pipe-connection-leak
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
« 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 3bc18c723831c4e4c17cfcb7bd36b60095007ad9..76ecb4a603b303bf135b899cd68572a90a45ed1e 100644
--- a/util/win/process_info_test.cc
+++ b/util/win/process_info_test.cc
@@ -16,6 +16,7 @@
#include <imagehlp.h>
#include <rpc.h>
+#include <stdlib.h>
#include <wchar.h>
#include "base/files/file_path.h"
@@ -52,8 +53,11 @@ TEST(ProcessInfo, Self) {
EXPECT_FALSE(process_info.IsWow64());
#else
EXPECT_FALSE(process_info.Is64Bit());
- // Assume we won't be running these tests on a 32 bit host OS.
- EXPECT_TRUE(process_info.IsWow64());
+ char* processor_architew6432 = getenv("PROCESSOR_ARCHITEW6432");
Mark Mentovai 2015/09/11 22:38:56 I think that using environment variables like this
scottmg 2015/09/11 23:39:55 Yeah, that's I tried to verify with "some other" s
+ if (processor_architew6432 && std::string(processor_architew6432) == "AMD64")
Mark Mentovai 2015/09/11 22:38:56 Just strcmp() instead of creating a std::string?
+ EXPECT_TRUE(process_info.IsWow64());
+ else
+ EXPECT_FALSE(process_info.IsWow64());
#endif
std::wstring command_line;
« 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