Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: components/password_manager/core/browser/password_store_unittest.cc

Issue 1402553002: Don't use base::MessageLoop::{Quit,QuitClosure} in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/nacl/broker/nacl_broker_listener.cc ('k') | components/scheduler/base/task_queue_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698