Index: components/password_manager/core/browser/password_form_manager_unittest.cc |
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc |
index 30b7e325daeac7c635ff8627f91dfc9ba0776955..3ec98bfdec1f54fb9c15a8f7f9317a64099da4cc 100644 |
--- a/components/password_manager/core/browser/password_form_manager_unittest.cc |
+++ b/components/password_manager/core/browser/password_form_manager_unittest.cc |
@@ -71,7 +71,6 @@ class MockPasswordManagerDriver : public StubPasswordManagerDriver { |
~MockPasswordManagerDriver() {} |
- MOCK_METHOD0(IsOffTheRecord, bool()); |
MOCK_METHOD1(AllowPasswordGenerationForForm, |
void(const autofill::PasswordForm&)); |
@@ -350,8 +349,6 @@ TEST_F(PasswordFormManagerTest, |
TEST_F(PasswordFormManagerTest, PSLMatchedCredentialsMetadataUpdated) { |
TestPasswordManagerClient client_with_store(mock_store()); |
- EXPECT_CALL(*(client_with_store.mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
TestPasswordManager manager(&client_with_store); |
PasswordFormManager form_manager(&manager, &client_with_store, |
@@ -483,8 +480,6 @@ TEST_F(PasswordFormManagerTest, TestUpdatePasswordFromNewPasswordElement) { |
PasswordFormManager manager(NULL, &client_with_store, |
client_with_store.driver(), *observed_form(), |
false); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
SimulateMatchingPhase(&manager, RESULT_MATCH_FOUND); |
// User submits current and new credentials to the observed form. |
@@ -609,8 +604,6 @@ TEST_F(PasswordFormManagerTest, TestAlternateUsername) { |
false); |
EXPECT_CALL(*client_with_store.mock_driver(), |
AllowPasswordGenerationForForm(_)).Times(1); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
password_store->AddLogin(*saved_match()); |
manager.FetchMatchingLoginsFromPasswordStore(PasswordStore::ALLOW_PROMPT); |
@@ -780,8 +773,6 @@ TEST_F(PasswordFormManagerTest, TestSendNotBlacklistedMessage) { |
&password_manager, client(), client()->driver(), *observed_form(), false); |
EXPECT_CALL(*(client()->mock_driver()), AllowPasswordGenerationForForm(_)) |
.Times(1); |
- EXPECT_CALL(*(client()->mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
SimulateFetchMatchingLoginsFromPasswordStore(&manager_creds); |
// We need add heap allocated objects to result. |
result.push_back(CreateSavedMatch(false)); |
@@ -798,8 +789,6 @@ TEST_F(PasswordFormManagerTest, TestSendNotBlacklistedMessage) { |
&password_manager, client(), client()->driver(), signup_form, false); |
EXPECT_CALL(*(client()->mock_driver()), AllowPasswordGenerationForForm(_)) |
.Times(1); |
- EXPECT_CALL(*(client()->mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
SimulateFetchMatchingLoginsFromPasswordStore(&manager_dropped_creds); |
result.clear(); |
result.push_back(CreateSavedMatch(false)); |
@@ -829,8 +818,6 @@ TEST_F(PasswordFormManagerTest, TestForceInclusionOfGeneratedPasswords) { |
&password_manager, client(), client()->driver(), *observed_form(), false); |
EXPECT_CALL(*(client()->mock_driver()), AllowPasswordGenerationForForm(_)) |
.Times(1); |
- EXPECT_CALL(*(client()->mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
std::vector<PasswordForm*> results; |
results.push_back(CreateSavedMatch(false)); |
@@ -908,8 +895,6 @@ TEST_F(PasswordFormManagerTest, TestUpdateIncompleteCredentials) { |
encountered_form.submit_element = ASCIIToUTF16("signIn"); |
TestPasswordManagerClient client_with_store(mock_store()); |
- EXPECT_CALL(*(client_with_store.mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
EXPECT_CALL(*(client_with_store.mock_driver()), |
AllowPasswordGenerationForForm(_)); |
@@ -965,8 +950,6 @@ TEST_F(PasswordFormManagerTest, TestUpdateIncompleteCredentials) { |
} |
TEST_F(PasswordFormManagerTest, TestScoringPublicSuffixMatch) { |
- EXPECT_CALL(*(client()->mock_driver()), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
EXPECT_CALL(*(client()->mock_driver()), AllowPasswordGenerationForForm(_)); |
TestPasswordManager password_manager(client()); |
@@ -1119,8 +1102,6 @@ TEST_F(PasswordFormManagerTest, CorrectlyUpdatePasswordsWithSameUsername) { |
TestPasswordManager password_manager(&client_with_store); |
EXPECT_CALL(*client_with_store.mock_driver(), |
AllowPasswordGenerationForForm(_)).Times(2); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
// Add two credentials with the same username. Both should score the same |
// and be seen as candidates to autofill. |
@@ -1175,8 +1156,6 @@ TEST_F(PasswordFormManagerTest, CorrectlyUpdatePasswordsWithSameUsername) { |
TEST_F(PasswordFormManagerTest, UploadFormData_NewPassword) { |
TestPasswordManagerClient client_with_store(mock_store()); |
TestPasswordManager password_manager(&client_with_store); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
// For newly saved passwords, upload a vote for autofill::PASSWORD. |
PasswordFormManager form_manager(&password_manager, &client_with_store, |
@@ -1211,8 +1190,6 @@ TEST_F(PasswordFormManagerTest, UploadFormData_NewPassword) { |
TEST_F(PasswordFormManagerTest, UploadFormData_AccountCreationPassword) { |
TestPasswordManagerClient client_with_store(mock_store()); |
TestPasswordManager password_manager(&client_with_store); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
PasswordForm form(*observed_form()); |
@@ -1271,8 +1248,6 @@ TEST_F(PasswordFormManagerTest, CorrectlySavePasswordWithoutUsernameFields) { |
TestPasswordManager password_manager(&client_with_store); |
EXPECT_CALL(*client_with_store.mock_driver(), |
AllowPasswordGenerationForForm(_)).Times(2); |
- EXPECT_CALL(*client_with_store.mock_driver(), IsOffTheRecord()) |
- .WillRepeatedly(Return(false)); |
PasswordForm form(*observed_form()); |
form.username_element.clear(); |