Commit 19ef0e6f authored by gcasto@chromium.org's avatar gcasto@chromium.org

[Password Generation] Fix memory leak in test from r284169

BUG=None

Review URL: https://codereview.chromium.org/402993004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284307 0039d316-1c4b-4281-b951-d872f2087c98
parent 236230f5
...@@ -335,7 +335,9 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSubmitEmptyStore) { ...@@ -335,7 +335,9 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSubmitEmptyStore) {
// occured. // occured.
EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0)); EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0));
EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))); EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
EXPECT_CALL(client_, AutomaticPasswordSavePtr(_)).Times(Exactly(1)); scoped_ptr<PasswordFormManager> saved_form_manager;
EXPECT_CALL(client_, AutomaticPasswordSavePtr(_)).Times(Exactly(1))
.WillOnce(WithArg<0>(SaveToScopedPtr(&saved_form_manager)));
// Now the password manager waits for the navigation to complete. // Now the password manager waits for the navigation to complete.
observed.clear(); observed.clear();
...@@ -643,7 +645,9 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSavedAutocompleteOff) { ...@@ -643,7 +645,9 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSavedAutocompleteOff) {
// occured. // occured.
EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0)); EXPECT_CALL(client_, PromptUserToSavePasswordPtr(_)).Times(Exactly(0));
EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))); EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
EXPECT_CALL(client_, AutomaticPasswordSavePtr(_)).Times(Exactly(1)); scoped_ptr<PasswordFormManager> saved_form_manager;
EXPECT_CALL(client_, AutomaticPasswordSavePtr(_)).Times(Exactly(1))
.WillOnce(WithArg<0>(SaveToScopedPtr(&saved_form_manager)));
// Now the password manager waits for the navigation to complete. // Now the password manager waits for the navigation to complete.
observed.clear(); observed.clear();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment