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

Unified Diff: components/safe_browsing/password_protection/password_protection_service_unittest.cc

Issue 2905343002: Show interstitial on a password on focus ping with PHISHING verdict. (Closed)
Patch Set: nit Created 3 years, 7 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
Index: components/safe_browsing/password_protection/password_protection_service_unittest.cc
diff --git a/components/safe_browsing/password_protection/password_protection_service_unittest.cc b/components/safe_browsing/password_protection/password_protection_service_unittest.cc
index 3deb72a2720a8fb36af52612dc0dabb1c83de3ee..61697283ed7e18c811c36ac5bd41e7715c121e82 100644
--- a/components/safe_browsing/password_protection/password_protection_service_unittest.cc
+++ b/components/safe_browsing/password_protection/password_protection_service_unittest.cc
@@ -78,6 +78,7 @@ class TestPasswordProtectionService : public PasswordProtectionService {
void RequestFinished(
PasswordProtectionRequest* request,
+ bool already_cached_unused,
std::unique_ptr<LoginReputationClientResponse> response) override {
latest_request_ = request;
latest_response_ = std::move(response);
@@ -105,6 +106,10 @@ class TestPasswordProtectionService : public PasswordProtectionService {
return true;
}
+ void ShowPhishingInterstitial(const GURL& phishing_url,
+ const std::string& token,
+ content::WebContents* web_contents) override {}
+
bool IsHistorySyncEnabled() override { return false; }
LoginReputationClientResponse* latest_response() {
@@ -115,7 +120,7 @@ class TestPasswordProtectionService : public PasswordProtectionService {
size_t GetPendingRequestsCount() { return requests_.size(); }
- LoginReputationClientRequest* GetLatestRequestProto() {
+ const LoginReputationClientRequest* GetLatestRequestProto() {
return latest_request_ ? latest_request_->request_proto() : nullptr;
}
@@ -609,7 +614,7 @@ TEST_F(PasswordProtectionServiceTest, VerifyPasswordOnFocusRequestProto) {
request_->OnURLFetchComplete(&fetcher);
base::RunLoop().RunUntilIdle();
- LoginReputationClientRequest* actual_request =
+ const LoginReputationClientRequest* actual_request =
password_protection_service_->GetLatestRequestProto();
EXPECT_EQ(kTargetUrl, actual_request->page_url());
EXPECT_EQ(LoginReputationClientRequest::UNFAMILIAR_LOGIN_PAGE,
@@ -638,7 +643,7 @@ TEST_F(PasswordProtectionServiceTest,
request_->OnURLFetchComplete(&fetcher);
base::RunLoop().RunUntilIdle();
- LoginReputationClientRequest* actual_request =
+ const LoginReputationClientRequest* actual_request =
password_protection_service_->GetLatestRequestProto();
EXPECT_EQ(kTargetUrl, actual_request->page_url());
EXPECT_EQ(LoginReputationClientRequest::PASSWORD_REUSE_EVENT,
« no previous file with comments | « components/safe_browsing/password_protection/password_protection_service.cc ('k') | components/safe_browsing_db/hit_report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698