| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif
ier_win.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif
ier_win.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/memory_mapped_file.h" | 8 #include "base/files/memory_mapped_file.h" |
| 9 #include "base/native_library.h" | 9 #include "base/native_library.h" |
| 10 #include "base/path_service.h" | |
| 11 #include "base/scoped_native_library.h" | 10 #include "base/scoped_native_library.h" |
| 12 #include "base/win/pe_image.h" | 11 #include "base/win/pe_image.h" |
| 13 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt
est_util_win.h" | 12 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_unitt
est_util_win.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 14 |
| 16 namespace safe_browsing { | 15 namespace safe_browsing { |
| 17 | 16 |
| 18 class SafeBrowsingModuleVerifierWinTest : public testing::Test { | 17 class SafeBrowsingModuleVerifierWinTest : public testing::Test { |
| 19 protected: | 18 protected: |
| 20 void SetUpTestDllAndPEImages() { | 19 void SetUpTestDllAndPEImages() { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Edit the exported function, VerifyModule should now return the function | 144 // Edit the exported function, VerifyModule should now return the function |
| 146 // name in modified_exports. | 145 // name in modified_exports. |
| 147 EditExport(); | 146 EditExport(); |
| 148 EXPECT_EQ(MODULE_STATE_MODIFIED, | 147 EXPECT_EQ(MODULE_STATE_MODIFIED, |
| 149 VerifyModule(kTestDllNames[0], &modified_exports)); | 148 VerifyModule(kTestDllNames[0], &modified_exports)); |
| 150 EXPECT_EQ(1, modified_exports.size()); | 149 EXPECT_EQ(1, modified_exports.size()); |
| 151 EXPECT_EQ(0, std::string(kTestExportName).compare(*modified_exports.begin())); | 150 EXPECT_EQ(0, std::string(kTestExportName).compare(*modified_exports.begin())); |
| 152 } | 151 } |
| 153 | 152 |
| 154 } // namespace safe_browsing | 153 } // namespace safe_browsing |
| OLD | NEW |