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

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

Issue 2447813002: Strengthen the rules when the Credential Manager API is disabled. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/password_manager/content/browser/credential_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a03315ec1ee635a3073c04d1c176a8014a573f55..b9c6ef38f16e39c029f8a53a20243c6851e4512b 100644
--- a/components/password_manager/content/browser/credential_manager_impl_unittest.cc
+++ b/components/password_manager/content/browser/credential_manager_impl_unittest.cc
@@ -55,8 +55,8 @@ const char kTestAndroidRealm2[] = "android://hash@com.example.two.android/";
class MockPasswordManagerClient : public StubPasswordManagerClient {
public:
MOCK_CONST_METHOD0(IsSavingAndFillingEnabledForCurrentPage, bool());
+ MOCK_CONST_METHOD0(IsFillingEnabledForCurrentPage, bool());
MOCK_CONST_METHOD0(IsOffTheRecord, bool());
- MOCK_CONST_METHOD0(DidLastPageLoadEncounterSSLErrors, bool());
MOCK_METHOD0(NotifyUserAutoSigninPtr, bool());
MOCK_METHOD1(NotifyUserCouldBeAutoSignedInPtr,
bool(autofill::PasswordForm* form));
@@ -213,9 +213,9 @@ class CredentialManagerImplTest : public content::RenderViewHostTestHarness {
web_contents(), client_.get(), stub_driver_.get()));
ON_CALL(*client_, IsSavingAndFillingEnabledForCurrentPage())
.WillByDefault(testing::Return(true));
+ ON_CALL(*client_, IsFillingEnabledForCurrentPage())
+ .WillByDefault(testing::Return(true));
ON_CALL(*client_, IsOffTheRecord()).WillByDefault(testing::Return(false));
- ON_CALL(*client_, DidLastPageLoadEncounterSSLErrors())
- .WillByDefault(testing::Return(false));
NavigateAndCommit(GURL("https://example.com/test.html"));
@@ -646,7 +646,8 @@ TEST_F(CredentialManagerImplTest, CredentialManagerOnRequireUserMediation) {
TEST_F(CredentialManagerImplTest,
CredentialManagerOnRequireUserMediationIncognito) {
- EXPECT_CALL(*client_, IsOffTheRecord()).WillRepeatedly(testing::Return(true));
+ EXPECT_CALL(*client_, IsSavingAndFillingEnabledForCurrentPage())
+ .WillRepeatedly(testing::Return(false));
store_->AddLogin(form_);
RunAllPendingTasks();
@@ -1026,8 +1027,8 @@ TEST_F(CredentialManagerImplTest, RequestCredentialWithFirstRunAndSkip) {
TEST_F(CredentialManagerImplTest, RequestCredentialWithTLSErrors) {
// If we encounter TLS errors, we won't return credentials.
- EXPECT_CALL(*client_, DidLastPageLoadEncounterSSLErrors())
- .WillRepeatedly(testing::Return(true));
+ EXPECT_CALL(*client_, IsFillingEnabledForCurrentPage())
+ .WillRepeatedly(testing::Return(false));
store_->AddLogin(form_);
« no previous file with comments | « components/password_manager/content/browser/credential_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698