| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/prefs/pref_service.h" | |
| 15 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 16 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 18 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
| 21 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 22 #include "chrome/browser/password_manager/native_backend_gnome_x.h" | 21 #include "chrome/browser/password_manager/native_backend_gnome_x.h" |
| 23 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 24 #include "components/autofill/core/common/password_form.h" | 23 #include "components/autofill/core/common/password_form.h" |
| 25 #include "components/password_manager/core/browser/psl_matching_helper.h" | 24 #include "components/password_manager/core/browser/psl_matching_helper.h" |
| 26 #include "components/password_manager/core/common/password_manager_pref_names.h" | 25 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 26 #include "components/prefs/pref_service.h" |
| 27 #include "content/public/test/test_browser_thread.h" | 27 #include "content/public/test/test_browser_thread.h" |
| 28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 30 |
| 31 using autofill::PasswordForm; | 31 using autofill::PasswordForm; |
| 32 using base::UTF8ToUTF16; | 32 using base::UTF8ToUTF16; |
| 33 using base::UTF16ToUTF8; | 33 using base::UTF16ToUTF8; |
| 34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using password_manager::PasswordStoreChange; | 35 using password_manager::PasswordStoreChange; |
| 36 using password_manager::PasswordStoreChangeList; | 36 using password_manager::PasswordStoreChangeList; |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 base::Bind(&CheckTrue)); | 1233 base::Bind(&CheckTrue)); |
| 1234 | 1234 |
| 1235 RunBothThreads(); | 1235 RunBothThreads(); |
| 1236 | 1236 |
| 1237 EXPECT_EQ(2u, form_list.size()); | 1237 EXPECT_EQ(2u, form_list.size()); |
| 1238 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_), | 1238 EXPECT_THAT(form_list, UnorderedElementsAre(Pointee(form_google_), |
| 1239 Pointee(form_facebook_))); | 1239 Pointee(form_facebook_))); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 // TODO(mdm): add more basic tests here at some point. | 1242 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |