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

Unified Diff: base/win/pe_image_unittest.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 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 | « base/win/pe_image.cc ('k') | build/all.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/pe_image_unittest.cc
diff --git a/base/win/pe_image_unittest.cc b/base/win/pe_image_unittest.cc
index 238c924f62cc6b8dad10d75a361f8fb4a11b746c..af4209be18a89c9d845031f56e810a0d2a2fea40 100644
--- a/base/win/pe_image_unittest.cc
+++ b/base/win/pe_image_unittest.cc
@@ -267,5 +267,21 @@ TEST(PEImageTest, RetrievesExports) {
FreeLibrary(module);
}
+// Test that we can get debug id out of a module.
+TEST(PEImageTest, GetDebugId) {
+ HMODULE module = LoadLibrary(L"advapi32.dll");
+ ASSERT_TRUE(NULL != module);
+
+ PEImage pe(module);
+ GUID guid = {0};
+ DWORD age = 0;
+ EXPECT_TRUE(pe.GetDebugId(&guid, &age));
+
+ GUID empty_guid = {0};
+ EXPECT_TRUE(!IsEqualGUID(empty_guid, guid));
+ EXPECT_NE(0U, age);
+ FreeLibrary(module);
+}
+
} // namespace win
} // namespace base
« no previous file with comments | « base/win/pe_image.cc ('k') | build/all.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698