| 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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 CreatePasswordFormFromDataForTesting(kTestCredential)); | 379 CreatePasswordFormFromDataForTesting(kTestCredential)); |
| 380 store->AddLogin(*test_form); | 380 store->AddLogin(*test_form); |
| 381 base::MessageLoop::current()->RunUntilIdle(); | 381 base::MessageLoop::current()->RunUntilIdle(); |
| 382 | 382 |
| 383 MockPasswordStoreObserver mock_observer; | 383 MockPasswordStoreObserver mock_observer; |
| 384 store->AddObserver(&mock_observer); | 384 store->AddObserver(&mock_observer); |
| 385 | 385 |
| 386 EXPECT_CALL(mock_observer, OnLoginsChanged(testing::SizeIs(1u))); | 386 EXPECT_CALL(mock_observer, OnLoginsChanged(testing::SizeIs(1u))); |
| 387 store->RemoveLoginsCreatedBetween( | 387 store->RemoveLoginsCreatedBetween( |
| 388 base::Time::FromDoubleT(0), base::Time::FromDoubleT(2), | 388 base::Time::FromDoubleT(0), base::Time::FromDoubleT(2), |
| 389 base::MessageLoop::current()->QuitClosure()); | 389 base::MessageLoop::current()->QuitWhenIdleClosure()); |
| 390 base::MessageLoop::current()->Run(); | 390 base::MessageLoop::current()->Run(); |
| 391 testing::Mock::VerifyAndClearExpectations(&mock_observer); | 391 testing::Mock::VerifyAndClearExpectations(&mock_observer); |
| 392 | 392 |
| 393 store->RemoveObserver(&mock_observer); | 393 store->RemoveObserver(&mock_observer); |
| 394 store->Shutdown(); | 394 store->Shutdown(); |
| 395 base::MessageLoop::current()->RunUntilIdle(); | 395 base::MessageLoop::current()->RunUntilIdle(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 // When no Android applications are actually affiliated with the realm of the | 398 // When no Android applications are actually affiliated with the realm of the |
| 399 // observed form, GetLoginsWithAffiliations() should still return the exact and | 399 // observed form, GetLoginsWithAffiliations() should still return the exact and |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 OnGetPasswordStoreResultsConstRef(UnorderedPasswordFormElementsAre( | 788 OnGetPasswordStoreResultsConstRef(UnorderedPasswordFormElementsAre( |
| 789 expected_credentials_after_update.get()))); | 789 expected_credentials_after_update.get()))); |
| 790 store->GetAutofillableLogins(&mock_consumer); | 790 store->GetAutofillableLogins(&mock_consumer); |
| 791 store->Shutdown(); | 791 store->Shutdown(); |
| 792 base::MessageLoop::current()->RunUntilIdle(); | 792 base::MessageLoop::current()->RunUntilIdle(); |
| 793 } | 793 } |
| 794 } | 794 } |
| 795 } | 795 } |
| 796 | 796 |
| 797 } // namespace password_manager | 797 } // namespace password_manager |
| OLD | NEW |