| 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 "chrome/browser/password_manager/password_store_mac.h" | 5 #include "chrome/browser/password_manager/password_store_mac.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 using testing::DoAll; | 43 using testing::DoAll; |
| 44 using testing::Invoke; | 44 using testing::Invoke; |
| 45 using testing::IsEmpty; | 45 using testing::IsEmpty; |
| 46 using testing::SizeIs; | 46 using testing::SizeIs; |
| 47 using testing::WithArg; | 47 using testing::WithArg; |
| 48 | 48 |
| 49 namespace { | 49 namespace { |
| 50 | 50 |
| 51 ACTION(QuitUIMessageLoop) { | 51 ACTION(QuitUIMessageLoop) { |
| 52 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 52 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 53 base::MessageLoop::current()->Quit(); | 53 base::MessageLoop::current()->QuitWhenIdle(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // From the mock's argument #0 of type const std::vector<PasswordForm*>& takes | 56 // From the mock's argument #0 of type const std::vector<PasswordForm*>& takes |
| 57 // the first form and copies it to the form pointed to by |target_form_ptr|. | 57 // the first form and copies it to the form pointed to by |target_form_ptr|. |
| 58 ACTION_P(SaveACopyOfFirstForm, target_form_ptr) { | 58 ACTION_P(SaveACopyOfFirstForm, target_form_ptr) { |
| 59 ASSERT_FALSE(arg0.empty()); | 59 ASSERT_FALSE(arg0.empty()); |
| 60 *target_form_ptr = *arg0[0]; | 60 *target_form_ptr = *arg0[0]; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void Noop() { | 63 void Noop() { |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1854 histogram_tester_->ExpectUniqueSample( | 1854 histogram_tester_->ExpectUniqueSample( |
| 1855 "PasswordManager.KeychainMigration.NumPasswordsOnFailure", 1, 1); | 1855 "PasswordManager.KeychainMigration.NumPasswordsOnFailure", 1, 1); |
| 1856 histogram_tester_->ExpectUniqueSample( | 1856 histogram_tester_->ExpectUniqueSample( |
| 1857 "PasswordManager.KeychainMigration.NumFailedPasswords", 1, 1); | 1857 "PasswordManager.KeychainMigration.NumFailedPasswords", 1, 1); |
| 1858 histogram_tester_->ExpectUniqueSample( | 1858 histogram_tester_->ExpectUniqueSample( |
| 1859 "PasswordManager.KeychainMigration.NumChromeOwnedInaccessiblePasswords", | 1859 "PasswordManager.KeychainMigration.NumChromeOwnedInaccessiblePasswords", |
| 1860 2, 1); | 1860 2, 1); |
| 1861 // Don't test the encryption key access. | 1861 // Don't test the encryption key access. |
| 1862 histogram_tester_.reset(); | 1862 histogram_tester_.reset(); |
| 1863 } | 1863 } |
| OLD | NEW |