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

Unified Diff: components/password_manager/core/browser/password_manager_test_utils.h

Issue 896903003: [PasswordManager clean-up] Merge copies of CreatePasswordFormFromData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@451018_more_scoped_vector
Patch Set: Rebased again Created 5 years, 10 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: components/password_manager/core/browser/password_manager_test_utils.h
diff --git a/components/password_manager/core/browser/password_form_data.h b/components/password_manager/core/browser/password_manager_test_utils.h
similarity index 73%
rename from components/password_manager/core/browser/password_form_data.h
rename to components/password_manager/core/browser/password_manager_test_utils.h
index 33ea01c7cbe2f549076569547ddcc690ebcc17f8..71599a446b8a0dfab35e83201e9b1c91741b5fd1 100644
--- a/components/password_manager/core/browser/password_form_data.h
+++ b/components/password_manager/core/browser/password_manager_test_utils.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
-#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
+#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_
-#include <ostream>
+#include <vector>
#include "base/memory/scoped_ptr.h"
#include "components/autofill/core/common/password_form.h"
@@ -15,6 +15,12 @@
namespace password_manager {
+// These constants are used by CreatePasswordFormFromDataForTesting to supply
+// values not covered by PasswordFormData.
+extern const char kTestingAvatarUrlSpec[];
+extern const char kTestingFederationUrlSpec[];
+extern const int kTestingDaysAfterPasswordsAreSynced;
+
// Struct used for creation of PasswordForms from static arrays of data.
// Note: This is only meant to be used in unit test.
struct PasswordFormData {
@@ -33,7 +39,7 @@ struct PasswordFormData {
};
// Creates and returns a new PasswordForm built from form_data.
-scoped_ptr<autofill::PasswordForm> CreatePasswordFormFromData(
+scoped_ptr<autofill::PasswordForm> CreatePasswordFormFromDataForTesting(
const PasswordFormData& form_data);
// Checks whether two vectors of PasswordForms contain equivalent elements,
@@ -51,4 +57,4 @@ MATCHER_P(ContainsSamePasswordForms, forms, "") {
} // namespace password_manager
-#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698