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 // The passwords in the tests below are all empty because PasswordStoreDefault | 5 // The passwords in the tests below are all empty because PasswordStoreDefault |
6 // does not store the actual passwords on OS X (they are stored in the Keychain | 6 // does not store the actual passwords on OS X (they are stored in the Keychain |
7 // instead). We could special-case it, but it is easier to just have empty | 7 // instead). We could special-case it, but it is easier to just have empty |
8 // passwords. This will not be needed anymore if crbug.com/466638 is fixed. | 8 // passwords. This will not be needed anymore if crbug.com/466638 is fixed. |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 base::FilePath test_login_db_file_path() const { | 92 base::FilePath test_login_db_file_path() const { |
93 return temp_dir_.path().Append(FILE_PATH_LITERAL("login_test")); | 93 return temp_dir_.path().Append(FILE_PATH_LITERAL("login_test")); |
94 } | 94 } |
95 | 95 |
96 base::MessageLoopForUI message_loop_; | 96 base::MessageLoopForUI message_loop_; |
97 base::ScopedTempDir temp_dir_; | 97 base::ScopedTempDir temp_dir_; |
98 }; | 98 }; |
99 | 99 |
100 ACTION(STLDeleteElements0) { | 100 ACTION(STLDeleteElements0) { |
101 STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 101 base::STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
102 } | 102 } |
103 | 103 |
104 TEST_F(PasswordStoreTest, IgnoreOldWwwGoogleLogins) { | 104 TEST_F(PasswordStoreTest, IgnoreOldWwwGoogleLogins) { |
105 scoped_refptr<PasswordStoreDefault> store(new PasswordStoreDefault( | 105 scoped_refptr<PasswordStoreDefault> store(new PasswordStoreDefault( |
106 base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), | 106 base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), |
107 base::WrapUnique(new LoginDatabase(test_login_db_file_path())))); | 107 base::WrapUnique(new LoginDatabase(test_login_db_file_path())))); |
108 store->Init(syncer::SyncableService::StartSyncFlare()); | 108 store->Init(syncer::SyncableService::StartSyncFlare()); |
109 | 109 |
110 const time_t cutoff = 1325376000; // 00:00 Jan 1 2012 UTC | 110 const time_t cutoff = 1325376000; // 00:00 Jan 1 2012 UTC |
111 static const PasswordFormData form_data[] = { | 111 static const PasswordFormData form_data[] = { |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 // Since GetAutofillableLoginsWithAffiliatedRealms schedules a request for | 827 // Since GetAutofillableLoginsWithAffiliatedRealms schedules a request for |
828 // affiliated realms to UI thread, don't shutdown UI thread until there are | 828 // affiliated realms to UI thread, don't shutdown UI thread until there are |
829 // no tasks in the UI queue. | 829 // no tasks in the UI queue. |
830 base::RunLoop().RunUntilIdle(); | 830 base::RunLoop().RunUntilIdle(); |
831 store->ShutdownOnUIThread(); | 831 store->ShutdownOnUIThread(); |
832 base::RunLoop().RunUntilIdle(); | 832 base::RunLoop().RunUntilIdle(); |
833 } | 833 } |
834 } | 834 } |
835 | 835 |
836 } // namespace password_manager | 836 } // namespace password_manager |
OLD | NEW |