Chromium Code Reviews| 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); |