| 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/prefs/pref_service.h" | |
| 11 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 12 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 13 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 15 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
| 18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 19 #include "chrome/browser/password_manager/native_backend_libsecret.h" | 18 #include "chrome/browser/password_manager/native_backend_libsecret.h" |
| 20 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 21 #include "components/autofill/core/common/password_form.h" | 20 #include "components/autofill/core/common/password_form.h" |
| 22 #include "components/password_manager/core/browser/psl_matching_helper.h" | 21 #include "components/password_manager/core/browser/psl_matching_helper.h" |
| 23 #include "components/password_manager/core/common/password_manager_pref_names.h" | 22 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 23 #include "components/prefs/pref_service.h" |
| 24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 using autofill::PasswordForm; | 27 using autofill::PasswordForm; |
| 28 using base::UTF8ToUTF16; | 28 using base::UTF8ToUTF16; |
| 29 using base::UTF16ToUTF8; | 29 using base::UTF16ToUTF8; |
| 30 using password_manager::PasswordStoreChange; | 30 using password_manager::PasswordStoreChange; |
| 31 using password_manager::PasswordStoreChangeList; | 31 using password_manager::PasswordStoreChangeList; |
| 32 using testing::Pointee; | 32 using testing::Pointee; |
| 33 using testing::UnorderedElementsAre; | 33 using testing::UnorderedElementsAre; |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 EXPECT_EQ(form_google_, *form_list[0]); | 924 EXPECT_EQ(form_google_, *form_list[0]); |
| 925 | 925 |
| 926 EXPECT_EQ(1u, global_mock_libsecret_items->size()); | 926 EXPECT_EQ(1u, global_mock_libsecret_items->size()); |
| 927 if (!global_mock_libsecret_items->empty()) { | 927 if (!global_mock_libsecret_items->empty()) { |
| 928 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, | 928 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, |
| 929 "chrome-42"); | 929 "chrome-42"); |
| 930 } | 930 } |
| 931 } | 931 } |
| 932 | 932 |
| 933 // TODO(mdm): add more basic tests here at some point. | 933 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |