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

Unified Diff: components/password_manager/core/browser/password_store_unittest.cc

Issue 1022823002: Make test outputs involving PasswordForms more readable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: components/password_manager/core/browser/password_store_unittest.cc
diff --git a/components/password_manager/core/browser/password_store_unittest.cc b/components/password_manager/core/browser/password_store_unittest.cc
index 4d8cf7ab6ab92383b28d4dadd97ce4c713849360..9e89c847bad5be1c3a5cd4750b117fd839e14e20 100644
--- a/components/password_manager/core/browser/password_store_unittest.cc
+++ b/components/password_manager/core/browser/password_store_unittest.cc
@@ -216,14 +216,17 @@ TEST_F(PasswordStoreTest, IgnoreOldWwwGoogleLogins) {
MockPasswordStoreConsumer consumer;
testing::InSequence s;
- EXPECT_CALL(consumer, OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(www_google_expected)))
+ EXPECT_CALL(consumer,
+ OnGetPasswordStoreResultsConstRef(
+ UnorderedPasswordFormElementsAre(www_google_expected)))
.RetiresOnSaturation();
EXPECT_CALL(consumer,
- OnGetPasswordStoreResultsConstRef(ContainsSamePasswordForms(
- accounts_google_expected))).RetiresOnSaturation();
- EXPECT_CALL(consumer, OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(bar_example_expected)))
+ OnGetPasswordStoreResultsConstRef(
+ UnorderedPasswordFormElementsAre(accounts_google_expected)))
+ .RetiresOnSaturation();
+ EXPECT_CALL(consumer,
+ OnGetPasswordStoreResultsConstRef(
+ UnorderedPasswordFormElementsAre(bar_example_expected)))
.RetiresOnSaturation();
store->GetLogins(www_google, PasswordStore::ALLOW_PROMPT, &consumer);
@@ -323,7 +326,7 @@ TEST_F(PasswordStoreTest, GetLoginsWithoutAffiliations) {
EXPECT_CALL(mock_consumer,
OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(expected_results.get())));
+ UnorderedPasswordFormElementsAre(expected_results.get())));
store->GetLogins(observed_form, PasswordStore::ALLOW_PROMPT, &mock_consumer);
store->Shutdown();
base::MessageLoop::current()->RunUntilIdle();
@@ -426,7 +429,8 @@ TEST_F(PasswordStoreTest, GetLoginsWithAffiliations) {
EXPECT_CALL(mock_consumer,
OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(expected_results.get())));
+ UnorderedPasswordFormElementsAre(expected_results.get())));
+
store->GetLogins(observed_form, PasswordStore::ALLOW_PROMPT, &mock_consumer);
store->Shutdown();
base::MessageLoop::current()->RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698