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

Unified Diff: chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc

Issue 471223002: Fixing VerifyLoadedModules not freeing the loaded dll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@binsign
Patch Set: Created 6 years, 4 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: chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc
diff --git a/chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc b/chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc
index b1ee0b3307f89dd4304bb6b599e2f22d1cea6563..619498c59f8653065098cba0ec3bcffc1182d7ad 100644
--- a/chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc
+++ b/chrome/browser/safe_browsing/environment_data_collection_win_unittest.cc
@@ -180,9 +180,8 @@ TEST(SafeBrowsingEnvironmentDataCollectionWinTest, VerifyLoadedModules) {
}
// Edit the first byte of the function exported by the first module.
- HMODULE module_handle = NULL;
- EXPECT_TRUE(
- GetModuleHandleEx(0, safe_browsing::kTestDllNames[0], &module_handle));
+ HMODULE module_handle = GetModuleHandle(safe_browsing::kTestDllNames[0]);
robertshield 2014/08/15 01:16:34 Nice find! Instead of this, please use GetModuleHa
+ EXPECT_NE(reinterpret_cast<HANDLE>(NULL), module_handle);
uint8_t* export_addr = reinterpret_cast<uint8_t*>(
GetProcAddress(module_handle, safe_browsing::kTestExportName));
EXPECT_NE(reinterpret_cast<uint8_t*>(NULL), export_addr);
« 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