Chromium Code Reviews| Index: components/password_manager/core/browser/password_manager_unittest.cc |
| diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc |
| index 5266521fa165fd61e8266494203c3c37e63ad2a9..bd6901220c61e08b673298ee5e63e35dc663dd99 100644 |
| --- a/components/password_manager/core/browser/password_manager_unittest.cc |
| +++ b/components/password_manager/core/browser/password_manager_unittest.cc |
| @@ -37,7 +37,7 @@ namespace { |
| class MockPasswordManagerClient : public StubPasswordManagerClient { |
| public: |
| - MOCK_CONST_METHOD0(IsPasswordManagerEnabledForCurrentPage, bool()); |
| + MOCK_CONST_METHOD0(IsEnabledForCurrentPage, bool()); |
| MOCK_CONST_METHOD2(IsSyncAccountCredential, |
| bool(const std::string&, const std::string&)); |
| MOCK_CONST_METHOD0(GetPasswordStore, PasswordStore*()); |
| @@ -102,7 +102,7 @@ class PasswordManagerTest : public testing::Test { |
| EXPECT_CALL(*store_, ReportMetrics(_, _)).Times(AnyNumber()); |
| CHECK(store_->Init(syncer::SyncableService::StartSyncFlare())); |
| - EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage()) |
| + EXPECT_CALL(client_, IsEnabledForCurrentPage()) |
| .WillRepeatedly(Return(true)); |
| EXPECT_CALL(client_, IsSyncAccountCredential(_, _)) |
| .WillRepeatedly(Return(false)); |
| @@ -715,37 +715,13 @@ TEST_F(PasswordManagerTest, PasswordFormReappearance) { |
| manager()->OnPasswordFormsRendered(&driver_, observed, true); |
| } |
| -TEST_F(PasswordManagerTest, SavingNotEnabledOnSSLErrors) { |
| - EXPECT_CALL(client_, DidLastPageLoadEncounterSSLErrors()) |
| - .WillRepeatedly(Return(true)); |
| - EXPECT_FALSE(manager()->IsSavingEnabledForCurrentPage()); |
| -} |
| - |
| -TEST_F(PasswordManagerTest, AutofillingNotEnabledOnSSLErrors) { |
| - // Test that in the presence of SSL errors, the password manager does not |
| - // attempt to autofill forms found on a website. |
| - EXPECT_CALL(client_, DidLastPageLoadEncounterSSLErrors()) |
| - .WillRepeatedly(Return(true)); |
| - |
| - // Let us pretend some forms were found on a website. |
| - std::vector<PasswordForm> forms; |
| - forms.push_back(MakeSimpleForm()); |
| - |
| - // Feed those forms to |manager()| and check that it does not try to find |
| - // matching saved credentials for the forms. |
| - EXPECT_CALL(*store_, GetLogins(_, _, _)).Times(Exactly(0)); |
| - manager()->OnPasswordFormsParsed(&driver_, forms); |
| -} |
| - |
| TEST_F(PasswordManagerTest, SavingDisabledIfManagerDisabled) { |
| - EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage()) |
| - .WillRepeatedly(Return(false)); |
| + EXPECT_CALL(client_, IsEnabledForCurrentPage()).WillRepeatedly(Return(false)); |
|
vabr (Chromium)
2015/03/26 14:51:59
If you get rid of IsEnabledForCurrentPage, then pl
|
| EXPECT_FALSE(manager()->IsSavingEnabledForCurrentPage()); |
| } |
| TEST_F(PasswordManagerTest, AutofillingDisabledIfManagerDisabled) { |
| - EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage()) |
| - .WillRepeatedly(Return(false)); |
| + EXPECT_CALL(client_, IsEnabledForCurrentPage()).WillRepeatedly(Return(false)); |
| // Let us pretend some forms were found on a website. |
| std::vector<PasswordForm> forms; |