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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller_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_ui_controller_unittest.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
index 5478e0290e5928e06a5368a10d7739f10b748bc4..e2838adfd4bf23675bcb7693bcd17346905db5d2 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -19,6 +20,7 @@
#include "components/password_manager/core/browser/stub_password_manager_driver.h"
#include "components/password_manager/core/common/credential_manager_types.h"
#include "components/password_manager/core/common/password_manager_ui.h"
+#include "components/password_manager/sync/browser/sync_store_result_filter.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
@@ -33,6 +35,14 @@ namespace {
const int64 kSlowNavigationDelayInMS = 6000;
const int64 kQuickNavigationDelayInMS = 500;
+class TestPasswordManagerClient
+ : public password_manager::StubPasswordManagerClient {
+ scoped_ptr<password_manager::StoreResultFilter> CreateStoreResultFilter()
+ const override {
+ return make_scoped_ptr(new password_manager::SyncStoreResultFilter(this));
+ }
+};
+
// This sublass is used to disable some code paths which are not essential for
// testing.
class TestManagePasswordsUIController : public ManagePasswordsUIController {
@@ -137,14 +147,12 @@ class ManagePasswordsUIControllerTest : public ChromeRenderViewHostTestHarness {
credential_info_.reset(new password_manager::CredentialInfo(info));
}
- password_manager::StubPasswordManagerClient* client() {
- return &client_;
- }
+ TestPasswordManagerClient* client() { return &client_; }
scoped_ptr<password_manager::PasswordFormManager> CreateFormManager();
private:
- password_manager::StubPasswordManagerClient client_;
+ TestPasswordManagerClient client_;
autofill::PasswordForm test_local_form_;
autofill::PasswordForm test_federated_form_;

Powered by Google App Engine
This is Rietveld 408576698