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

Unified Diff: chrome/browser/password_manager/password_store_x_unittest.cc

Issue 1022823002: Make test outputs involving PasswordForms more readable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + added new field that was added inbetween. 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: chrome/browser/password_manager/password_store_x_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 307098b8059cc31293051c0864c10e73833df25d..d74a8e0a726d5da802b41d667142c07bb80d08e8 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -26,9 +26,9 @@
#include "testing/gtest/include/gtest/gtest.h"
using autofill::PasswordForm;
-using password_manager::ContainsSamePasswordForms;
using password_manager::PasswordStoreChange;
using password_manager::PasswordStoreChangeList;
+using password_manager::UnorderedPasswordFormElementsAre;
using testing::ElementsAreArray;
using testing::IsEmpty;
@@ -417,17 +417,19 @@ TEST_P(PasswordStoreXTest, NativeMigration) {
MockPasswordStoreConsumer consumer;
// The autofillable forms should have been migrated to the native backend.
- EXPECT_CALL(consumer,
- OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(expected_autofillable.get())));
+ EXPECT_CALL(
+ consumer,
+ OnGetPasswordStoreResultsConstRef(
+ UnorderedPasswordFormElementsAre(expected_autofillable.get())));
store->GetAutofillableLogins(&consumer);
base::RunLoop().RunUntilIdle();
// The blacklisted forms should have been migrated to the native backend.
- EXPECT_CALL(consumer,
- OnGetPasswordStoreResultsConstRef(
- ContainsSamePasswordForms(expected_blacklisted.get())));
+ EXPECT_CALL(
+ consumer,
+ OnGetPasswordStoreResultsConstRef(
+ UnorderedPasswordFormElementsAre(expected_blacklisted.get())));
store->GetBlacklistLogins(&consumer);
base::RunLoop().RunUntilIdle();
@@ -439,8 +441,9 @@ TEST_P(PasswordStoreXTest, NativeMigration) {
EXPECT_CALL(ld_return, OnLoginDatabaseQueryDone(IsEmpty()));
} else {
// The autofillable logins should still be in the login DB.
- EXPECT_CALL(ld_return, OnLoginDatabaseQueryDone(ContainsSamePasswordForms(
- expected_autofillable.get())));
+ EXPECT_CALL(ld_return,
+ OnLoginDatabaseQueryDone(UnorderedPasswordFormElementsAre(
+ expected_autofillable.get())));
}
LoginDatabaseQueryCallback(store->login_db(), true, &ld_return);
@@ -453,8 +456,9 @@ TEST_P(PasswordStoreXTest, NativeMigration) {
EXPECT_CALL(ld_return, OnLoginDatabaseQueryDone(IsEmpty()));
} else {
// The blacklisted logins should still be in the login DB.
- EXPECT_CALL(ld_return, OnLoginDatabaseQueryDone(ContainsSamePasswordForms(
- expected_blacklisted.get())));
+ EXPECT_CALL(ld_return,
+ OnLoginDatabaseQueryDone(UnorderedPasswordFormElementsAre(
+ expected_blacklisted.get())));
}
LoginDatabaseQueryCallback(store->login_db(), false, &ld_return);

Powered by Google App Engine
This is Rietveld 408576698