OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 bool ContainsEqualPasswordFormsUnordered( | 66 bool ContainsEqualPasswordFormsUnordered( |
67 const std::vector<autofill::PasswordForm*>& expectations, | 67 const std::vector<autofill::PasswordForm*>& expectations, |
68 const std::vector<autofill::PasswordForm*>& actual_values, | 68 const std::vector<autofill::PasswordForm*>& actual_values, |
69 std::ostream* mismatches_output); | 69 std::ostream* mismatches_output); |
70 | 70 |
71 MATCHER_P(UnorderedPasswordFormElementsAre, expectations, "") { | 71 MATCHER_P(UnorderedPasswordFormElementsAre, expectations, "") { |
72 return ContainsEqualPasswordFormsUnordered(expectations, arg, | 72 return ContainsEqualPasswordFormsUnordered(expectations, arg, |
73 result_listener->stream()); | 73 result_listener->stream()); |
74 } | 74 } |
75 | 75 |
| 76 // Enables the command-line |feature|. |
| 77 void EnableFeature(const char* feature); |
| 78 |
76 class MockPasswordStoreObserver : public PasswordStore::Observer { | 79 class MockPasswordStoreObserver : public PasswordStore::Observer { |
77 public: | 80 public: |
78 MockPasswordStoreObserver(); | 81 MockPasswordStoreObserver(); |
79 ~MockPasswordStoreObserver() override; | 82 ~MockPasswordStoreObserver() override; |
80 | 83 |
81 MOCK_METHOD1(OnLoginsChanged, void(const PasswordStoreChangeList& changes)); | 84 MOCK_METHOD1(OnLoginsChanged, void(const PasswordStoreChangeList& changes)); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace password_manager | 87 } // namespace password_manager |
85 | 88 |
86 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_
H_ | 89 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_TEST_UTILS_
H_ |
OLD | NEW |