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

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_host_unittest.cc

Issue 9564001: Clean up password manager code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a unit test for sub-frame navigation Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" 9 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
10 #include "chrome/browser/safe_browsing/client_side_detection_host.h" 10 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 private: 117 private:
118 DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingService); 118 DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingService);
119 }; 119 };
120 120
121 class MockTestingProfile : public TestingProfile { 121 class MockTestingProfile : public TestingProfile {
122 public: 122 public:
123 MockTestingProfile() {} 123 MockTestingProfile() {}
124 virtual ~MockTestingProfile() {} 124 virtual ~MockTestingProfile() {}
125 125
126 MOCK_METHOD0(IsOffTheRecord, bool()); 126 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
127 }; 127 };
128 128
129 class MockBrowserFeatureExtractor : public BrowserFeatureExtractor { 129 class MockBrowserFeatureExtractor : public BrowserFeatureExtractor {
130 public: 130 public:
131 explicit MockBrowserFeatureExtractor( 131 explicit MockBrowserFeatureExtractor(
132 TabContents* tab, 132 TabContents* tab,
133 ClientSideDetectionService* service) 133 ClientSideDetectionService* service)
134 : BrowserFeatureExtractor(tab, service) {} 134 : BrowserFeatureExtractor(tab, service) {}
135 virtual ~MockBrowserFeatureExtractor() {} 135 virtual ~MockBrowserFeatureExtractor() {}
136 136
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get())); 748 EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get()));
749 EXPECT_EQ(url, resource.url); 749 EXPECT_EQ(url, resource.url);
750 EXPECT_EQ(url, resource.original_url); 750 EXPECT_EQ(url, resource.original_url);
751 resource.callback.Reset(); 751 resource.callback.Reset();
752 msg = process()->sink().GetFirstMessageMatching( 752 msg = process()->sink().GetFirstMessageMatching(
753 SafeBrowsingMsg_StartPhishingDetection::ID); 753 SafeBrowsingMsg_StartPhishingDetection::ID);
754 ASSERT_FALSE(msg); 754 ASSERT_FALSE(msg);
755 } 755 }
756 756
757 } // namespace safe_browsing 757 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698