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

Unified Diff: chrome/browser/password_manager/password_store_x_unittest.cc

Issue 283563002: Password Login Database: report correct changes from AddLogin(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: the nit addressed Created 6 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: chrome/browser/password_manager/password_store_x_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index dbd8065c6897acd087139d7231a4d91dbee1b0db..f0816388731eee6c23175b1fc327f9f3165131f9 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -30,6 +30,7 @@ using autofill::PasswordForm;
using content::BrowserThread;
using password_manager::ContainsAllPasswordForms;
using password_manager::PasswordStoreChange;
+using password_manager::PasswordStoreChangeList;
using testing::_;
using testing::DoAll;
using testing::ElementsAreArray;
@@ -59,7 +60,9 @@ class FailingBackend : public PasswordStoreX::NativeBackend {
public:
virtual bool Init() OVERRIDE { return true; }
- virtual bool AddLogin(const PasswordForm& form) OVERRIDE { return false; }
+ virtual PasswordStoreChangeList AddLogin(const PasswordForm& form) OVERRIDE {
+ return PasswordStoreChangeList();
+ }
virtual bool UpdateLogin(const PasswordForm& form) OVERRIDE { return false; }
virtual bool RemoveLogin(const PasswordForm& form) OVERRIDE { return false; }
@@ -92,9 +95,10 @@ class MockBackend : public PasswordStoreX::NativeBackend {
public:
virtual bool Init() OVERRIDE { return true; }
- virtual bool AddLogin(const PasswordForm& form) OVERRIDE {
+ virtual PasswordStoreChangeList AddLogin(const PasswordForm& form) OVERRIDE {
all_forms_.push_back(form);
- return true;
+ PasswordStoreChange change(PasswordStoreChange::ADD, form);
+ return PasswordStoreChangeList(1, change);
}
virtual bool UpdateLogin(const PasswordForm& form) OVERRIDE {
« no previous file with comments | « chrome/browser/password_manager/password_store_x.cc ('k') | components/password_manager/core/browser/login_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698