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

Unified Diff: components/password_manager/content/browser/credential_manager_impl_unittest.cc

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: merge 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/password_manager/content/browser/credential_manager_impl_unittest.cc
diff --git a/components/password_manager/content/browser/credential_manager_impl_unittest.cc b/components/password_manager/content/browser/credential_manager_impl_unittest.cc
index 4e5eb5d16822b87ba78f3e3ec48377baad0a652a..0e7a132ff74b5ff8c2ac9b886c4178ef1c106040 100644
--- a/components/password_manager/content/browser/credential_manager_impl_unittest.cc
+++ b/components/password_manager/content/browser/credential_manager_impl_unittest.cc
@@ -356,9 +356,9 @@ class CredentialManagerImplTest : public content::RenderViewHostTestHarness {
cm_service_impl_->Store(info, std::move(callback));
}
- void CallRequireUserMediation(
- CredentialManagerImpl::RequireUserMediationCallback callback) {
- cm_service_impl_->RequireUserMediation(std::move(callback));
+ void CallPreventSilentAccess(
+ CredentialManagerImpl::PreventSilentAccessCallback callback) {
+ cm_service_impl_->PreventSilentAccess(std::move(callback));
}
void CallGet(CredentialMediationRequirement mediation,
@@ -711,7 +711,7 @@ TEST_F(CredentialManagerImplTest,
EXPECT_FALSE(client_->pending_manager());
}
-TEST_F(CredentialManagerImplTest, CredentialManagerOnRequireUserMediation) {
+TEST_F(CredentialManagerImplTest, CredentialManagerOnPreventSilentAccess) {
store_->AddLogin(form_);
store_->AddLogin(subdomain_form_);
store_->AddLogin(cross_origin_form_);
@@ -727,7 +727,7 @@ TEST_F(CredentialManagerImplTest, CredentialManagerOnRequireUserMediation) {
EXPECT_FALSE(passwords[cross_origin_form_.signon_realm][0].skip_zero_click);
bool called = false;
- CallRequireUserMediation(base::Bind(&RespondCallback, &called));
+ CallPreventSilentAccess(base::Bind(&RespondCallback, &called));
RunAllPendingTasks();
@@ -744,7 +744,7 @@ TEST_F(CredentialManagerImplTest, CredentialManagerOnRequireUserMediation) {
}
TEST_F(CredentialManagerImplTest,
- CredentialManagerOnRequireUserMediationIncognito) {
+ CredentialManagerOnPreventSilentAccessIncognito) {
EXPECT_CALL(*client_, IsSavingAndFillingEnabledForCurrentPage())
.WillRepeatedly(testing::Return(false));
store_->AddLogin(form_);
@@ -756,7 +756,7 @@ TEST_F(CredentialManagerImplTest,
EXPECT_FALSE(passwords[form_.signon_realm][0].skip_zero_click);
bool called = false;
- CallRequireUserMediation(base::Bind(&RespondCallback, &called));
+ CallPreventSilentAccess(base::Bind(&RespondCallback, &called));
RunAllPendingTasks();
EXPECT_TRUE(called);
@@ -768,7 +768,7 @@ TEST_F(CredentialManagerImplTest,
}
TEST_F(CredentialManagerImplTest,
- CredentialManagerOnRequireUserMediationWithAffiliation) {
+ CredentialManagerOnPreventSilentAccessWithAffiliation) {
store_->AddLogin(form_);
store_->AddLogin(cross_origin_form_);
store_->AddLogin(affiliated_form1_);
@@ -793,7 +793,7 @@ TEST_F(CredentialManagerImplTest,
EXPECT_FALSE(passwords[affiliated_form2_.signon_realm][0].skip_zero_click);
bool called = false;
- CallRequireUserMediation(base::Bind(&RespondCallback, &called));
+ CallPreventSilentAccess(base::Bind(&RespondCallback, &called));
RunAllPendingTasks();
passwords = store_->stored_passwords();

Powered by Google App Engine
This is Rietveld 408576698