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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_state_unittest.cc

Issue 1260263002: Move ShouldFilterAutofillResult from ChromePasswordManagerClient to PasswordManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First version with sync layer, IsSyncCredential TODO still pending Created 5 years, 5 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/ui/passwords/manage_passwords_state_unittest.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_state_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_state_unittest.cc
index 08c365acd38190b3e3df209b8639cee6d80e2f88..38ec6b745a54d74f69d88240bb5a4cba46f353de 100644
--- a/chrome/browser/ui/passwords/manage_passwords_state_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_state_unittest.cc
@@ -4,10 +4,12 @@
#include "chrome/browser/ui/passwords/manage_passwords_state.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "components/password_manager/core/browser/password_form_manager.h"
#include "components/password_manager/core/browser/stub_password_manager_client.h"
#include "components/password_manager/core/common/credential_manager_types.h"
+#include "components/password_manager/sync/browser/sync_store_result_filter.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,6 +23,14 @@ using ::testing::UnorderedElementsAre;
namespace {
+class TestPasswordManagerClient
+ : public password_manager::StubPasswordManagerClient {
+ scoped_ptr<password_manager::StoreResultFilter> CreateStoreResultFilter()
+ const override {
+ return make_scoped_ptr(new password_manager::SyncStoreResultFilter(this));
+ }
+};
+
class ManagePasswordsStateTest : public testing::Test {
public:
void SetUp() override {
@@ -57,7 +67,7 @@ class ManagePasswordsStateTest : public testing::Test {
void(const password_manager::CredentialInfo&));
private:
- password_manager::StubPasswordManagerClient client_;
+ TestPasswordManagerClient client_;
ManagePasswordsState passwords_data_;
autofill::PasswordForm test_local_form_;

Powered by Google App Engine
This is Rietveld 408576698