| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 secret_item_get_secret = | 208 secret_item_get_secret = |
| 209 (decltype(&::secret_item_get_secret)) & mock_secret_item_get_secret; | 209 (decltype(&::secret_item_get_secret)) & mock_secret_item_get_secret; |
| 210 secret_value_get_text = | 210 secret_value_get_text = |
| 211 (decltype(&::secret_value_get_text)) & mock_secret_value_get_text; | 211 (decltype(&::secret_value_get_text)) & mock_secret_value_get_text; |
| 212 secret_item_get_attributes = (decltype(&::secret_item_get_attributes)) & | 212 secret_item_get_attributes = (decltype(&::secret_item_get_attributes)) & |
| 213 mock_secret_item_get_attributes; | 213 mock_secret_item_get_attributes; |
| 214 secret_item_load_secret_sync = (decltype(&::secret_item_load_secret_sync)) & | 214 secret_item_load_secret_sync = (decltype(&::secret_item_load_secret_sync)) & |
| 215 mock_secret_item_load_secret_sync; | 215 mock_secret_item_load_secret_sync; |
| 216 secret_value_unref = | 216 secret_value_unref = |
| 217 (decltype(&::secret_value_unref)) & mock_secret_value_unref; | 217 (decltype(&::secret_value_unref)) & mock_secret_value_unref; |
| 218 libsecret_loaded = true; | 218 libsecret_loaded_ = true; |
| 219 // Reset the state of the mock library. | 219 // Reset the state of the mock library. |
| 220 global_mock_libsecret_items->clear(); | 220 global_mock_libsecret_items->clear(); |
| 221 global_mock_libsecret_reject_local_ids = false; | 221 global_mock_libsecret_reject_local_ids = false; |
| 222 return true; | 222 return true; |
| 223 } | 223 } |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 void CheckPasswordChanges(const PasswordStoreChangeList& expected_list, | 226 void CheckPasswordChanges(const PasswordStoreChangeList& expected_list, |
| 227 const PasswordStoreChangeList& actual_list) { | 227 const PasswordStoreChangeList& actual_list) { |
| 228 ASSERT_EQ(expected_list.size(), actual_list.size()); | 228 ASSERT_EQ(expected_list.size(), actual_list.size()); |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 EXPECT_EQ(form_google_, *form_list[0]); | 970 EXPECT_EQ(form_google_, *form_list[0]); |
| 971 | 971 |
| 972 EXPECT_EQ(1u, global_mock_libsecret_items->size()); | 972 EXPECT_EQ(1u, global_mock_libsecret_items->size()); |
| 973 if (!global_mock_libsecret_items->empty()) { | 973 if (!global_mock_libsecret_items->empty()) { |
| 974 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, | 974 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, |
| 975 "chrome-42"); | 975 "chrome-42"); |
| 976 } | 976 } |
| 977 } | 977 } |
| 978 | 978 |
| 979 // TODO(mdm): add more basic tests here at some point. | 979 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |