| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/password_manager/password_store_proxy_mac.h" | 5 #include "chrome/browser/password_manager/password_store_proxy_mac.h" |
| 6 | 6 |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 using password_manager::MigrationStatus; | 30 using password_manager::MigrationStatus; |
| 31 using password_manager::PasswordStoreChange; | 31 using password_manager::PasswordStoreChange; |
| 32 using password_manager::PasswordStoreChangeList; | 32 using password_manager::PasswordStoreChangeList; |
| 33 using testing::_; | 33 using testing::_; |
| 34 using testing::ElementsAre; | 34 using testing::ElementsAre; |
| 35 using testing::IsEmpty; | 35 using testing::IsEmpty; |
| 36 using testing::Pointee; | 36 using testing::Pointee; |
| 37 | 37 |
| 38 ACTION(QuitUIMessageLoop) { | 38 ACTION(QuitUIMessageLoop) { |
| 39 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 39 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 40 base::MessageLoop::current()->Quit(); | 40 base::MessageLoop::current()->QuitWhenIdle(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Returns a change list corresponding to |form| being added. | 43 // Returns a change list corresponding to |form| being added. |
| 44 PasswordStoreChangeList AddChangeForForm(const PasswordForm& form) { | 44 PasswordStoreChangeList AddChangeForForm(const PasswordForm& form) { |
| 45 return PasswordStoreChangeList( | 45 return PasswordStoreChangeList( |
| 46 1, PasswordStoreChange(PasswordStoreChange::ADD, form)); | 46 1, PasswordStoreChange(PasswordStoreChange::ADD, form)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 class MockPasswordStoreConsumer | 49 class MockPasswordStoreConsumer |
| 50 : public password_manager::PasswordStoreConsumer { | 50 : public password_manager::PasswordStoreConsumer { |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 | 488 |
| 489 INSTANTIATE_TEST_CASE_P(, | 489 INSTANTIATE_TEST_CASE_P(, |
| 490 PasswordStoreProxyMacMigrationTest, | 490 PasswordStoreProxyMacMigrationTest, |
| 491 testing::Values(MigrationStatus::NOT_STARTED, | 491 testing::Values(MigrationStatus::NOT_STARTED, |
| 492 MigrationStatus::MIGRATED, | 492 MigrationStatus::MIGRATED, |
| 493 MigrationStatus::FAILED_ONCE, | 493 MigrationStatus::FAILED_ONCE, |
| 494 MigrationStatus::FAILED_TWICE)); | 494 MigrationStatus::FAILED_TWICE)); |
| 495 | 495 |
| 496 } // namespace | 496 } // namespace |
| OLD | NEW |