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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/module_load_analyzer_win_unittest.cc

Issue 1735383002: Try fix clang/win builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove virtual instead of override Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_load_analyzer.h " 5 #include "chrome/browser/safe_browsing/incident_reporting/module_load_analyzer.h "
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 24 matching lines...) Expand all
35 35
36 const char kNonWhitelistedModuleName[] = "blacklist_test_dll_1.dll"; 36 const char kNonWhitelistedModuleName[] = "blacklist_test_dll_1.dll";
37 37
38 class MockSafeBrowsingDatabaseManager : public TestSafeBrowsingDatabaseManager { 38 class MockSafeBrowsingDatabaseManager : public TestSafeBrowsingDatabaseManager {
39 public: 39 public:
40 MockSafeBrowsingDatabaseManager() {} 40 MockSafeBrowsingDatabaseManager() {}
41 41
42 MOCK_METHOD1(MatchModuleWhitelistString, bool(const std::string&)); 42 MOCK_METHOD1(MatchModuleWhitelistString, bool(const std::string&));
43 43
44 private: 44 private:
45 ~MockSafeBrowsingDatabaseManager() override {}
46
45 DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingDatabaseManager); 47 DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingDatabaseManager);
46 }; 48 };
47 49
48 class ModuleLoadAnalayzerTest : public testing::Test { 50 class ModuleLoadAnalayzerTest : public testing::Test {
49 protected: 51 protected:
50 ModuleLoadAnalayzerTest() 52 ModuleLoadAnalayzerTest()
51 : mock_incident_receiver_( 53 : mock_incident_receiver_(
52 new StrictMock<safe_browsing::MockIncidentReceiver>()), 54 new StrictMock<safe_browsing::MockIncidentReceiver>()),
53 mock_safe_browsing_database_manager_( 55 mock_safe_browsing_database_manager_(
54 new MockSafeBrowsingDatabaseManager()) { 56 new MockSafeBrowsingDatabaseManager()) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 114
113 TEST_F(ModuleLoadAnalayzerTest, TestNonWhitelistedDLLs) { 115 TEST_F(ModuleLoadAnalayzerTest, TestNonWhitelistedDLLs) {
114 EXPECT_CALL(*mock_safe_browsing_database_manager_, 116 EXPECT_CALL(*mock_safe_browsing_database_manager_,
115 MatchModuleWhitelistString(kNonWhitelistedModuleName)) 117 MatchModuleWhitelistString(kNonWhitelistedModuleName))
116 .WillOnce(Return(false)); 118 .WillOnce(Return(false));
117 119
118 ExpectIncident(kNonWhitelistedModuleName); 120 ExpectIncident(kNonWhitelistedModuleName);
119 } 121 }
120 122
121 } // namespace safe_browsing 123 } // namespace safe_browsing
OLDNEW
« 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