| 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 "components/password_manager/core/browser/password_store_default.h" | 5 #include "components/password_manager/core/browser/password_store_default.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 blacklisted_form->origin = GURL("http://foo.example.com/origin"); | 270 blacklisted_form->origin = GURL("http://foo.example.com/origin"); |
| 271 blacklisted_form->action = GURL("http://foo.example.com/action"); | 271 blacklisted_form->action = GURL("http://foo.example.com/action"); |
| 272 blacklisted_form->blacklisted_by_user = true; | 272 blacklisted_form->blacklisted_by_user = true; |
| 273 bad_store->AddLogin(*form); | 273 bad_store->AddLogin(*form); |
| 274 bad_store->AddLogin(*blacklisted_form); | 274 bad_store->AddLogin(*blacklisted_form); |
| 275 base::MessageLoop::current()->RunUntilIdle(); | 275 base::MessageLoop::current()->RunUntilIdle(); |
| 276 | 276 |
| 277 // Get all logins; autofillable logins; blacklisted logins. | 277 // Get all logins; autofillable logins; blacklisted logins. |
| 278 testing::StrictMock<MockPasswordStoreConsumer> mock_consumer; | 278 testing::StrictMock<MockPasswordStoreConsumer> mock_consumer; |
| 279 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); | 279 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); |
| 280 bad_store->GetLogins(*form, PasswordStore::DISALLOW_PROMPT, &mock_consumer); | 280 bad_store->GetLogins(*form, &mock_consumer); |
| 281 base::MessageLoop::current()->RunUntilIdle(); | 281 base::MessageLoop::current()->RunUntilIdle(); |
| 282 testing::Mock::VerifyAndClearExpectations(&mock_consumer); | 282 testing::Mock::VerifyAndClearExpectations(&mock_consumer); |
| 283 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); | 283 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); |
| 284 bad_store->GetAutofillableLogins(&mock_consumer); | 284 bad_store->GetAutofillableLogins(&mock_consumer); |
| 285 base::MessageLoop::current()->RunUntilIdle(); | 285 base::MessageLoop::current()->RunUntilIdle(); |
| 286 testing::Mock::VerifyAndClearExpectations(&mock_consumer); | 286 testing::Mock::VerifyAndClearExpectations(&mock_consumer); |
| 287 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); | 287 EXPECT_CALL(mock_consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); |
| 288 bad_store->GetBlacklistLogins(&mock_consumer); | 288 bad_store->GetBlacklistLogins(&mock_consumer); |
| 289 base::MessageLoop::current()->RunUntilIdle(); | 289 base::MessageLoop::current()->RunUntilIdle(); |
| 290 | 290 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 306 run_loop.Run(); | 306 run_loop.Run(); |
| 307 | 307 |
| 308 bad_store->RemoveLoginsSyncedBetween(base::Time(), base::Time::Max()); | 308 bad_store->RemoveLoginsSyncedBetween(base::Time(), base::Time::Max()); |
| 309 base::MessageLoop::current()->RunUntilIdle(); | 309 base::MessageLoop::current()->RunUntilIdle(); |
| 310 | 310 |
| 311 // Ensure no notifications and no explosions during shutdown either. | 311 // Ensure no notifications and no explosions during shutdown either. |
| 312 bad_store->RemoveObserver(&mock_observer); | 312 bad_store->RemoveObserver(&mock_observer); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace password_manager | 315 } // namespace password_manager |
| OLD | NEW |