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

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

Issue 2929533002: Fill has_password_field for password reuse ping (Closed)
Patch Set: Created 3 years, 6 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 61697283ed7e18c811c36ac5bd41e7715c121e82..267cf4bd9b876c0ac10ce531538d63f80c0a5308 100644
--- a/components/safe_browsing/password_protection/password_protection_service_unittest.cc
+++ b/components/safe_browsing/password_protection/password_protection_service_unittest.cc
@@ -172,7 +172,7 @@ class PasswordProtectionServiceTest : public testing::Test {
request_ = new PasswordProtectionRequest(
nullptr, target_url, GURL(kFormActionUrl), GURL(kPasswordFrameUrl),
std::string(), LoginReputationClientRequest::UNFAMILIAR_LOGIN_PAGE,
- password_protection_service_.get(), timeout_in_ms);
+ true, password_protection_service_.get(), timeout_in_ms);
request_->Start();
}
@@ -184,7 +184,7 @@ class PasswordProtectionServiceTest : public testing::Test {
request_ = new PasswordProtectionRequest(
nullptr, target_url, GURL(), GURL(), std::string(kSavedDomain),
- LoginReputationClientRequest::PASSWORD_REUSE_EVENT,
+ LoginReputationClientRequest::PASSWORD_REUSE_EVENT, true,
password_protection_service_.get(), timeout_in_ms);
request_->Start();
}
@@ -548,7 +548,7 @@ TEST_F(PasswordProtectionServiceTest, TestTearDownWithPendingRequests) {
password_protection_service_->StartRequest(
nullptr, target_url, GURL("http://foo.com/submit"),
GURL("http://foo.com/frame"), std::string(),
- LoginReputationClientRequest::UNFAMILIAR_LOGIN_PAGE);
+ LoginReputationClientRequest::UNFAMILIAR_LOGIN_PAGE, true);
// Destroy password_protection_service_ while there is one request pending.
password_protection_service_.reset();
@@ -650,6 +650,7 @@ TEST_F(PasswordProtectionServiceTest,
actual_request->trigger_type());
EXPECT_EQ(1, actual_request->frames_size());
EXPECT_EQ(kTargetUrl, actual_request->frames(0).url());
+ EXPECT_TRUE(actual_request->frames(0).has_password_field());
// TODO(jialiul): Update this test when we're ready to fill more fields.
ASSERT_FALSE(actual_request->has_password_reuse_event());
}

Powered by Google App Engine
This is Rietveld 408576698