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

Unified Diff: chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm

Issue 3041007: AutoFill Prefs dialog on Mac should list derived labels for profiles, not summaries. (Closed)
Patch Set: Fixing unit tests. Created 10 years, 5 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/autofill/autofill_dialog_controller_mac_unittest.mm
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm b/chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm
index 97c24679601eff421eecf167b9623858bcf3257f..d3e2550ba17f9f49d6de3a3f9f3d1b6cec4a08b8 100644
--- a/chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm
@@ -284,6 +284,9 @@ TEST_F(AutoFillDialogControllerTest, AutoFillDataMutation) {
ASSERT_TRUE(observer_.profiles_.size() == 1);
profiles()[0]->set_unique_id(observer_.profiles_[0].unique_id());
+ // Do not compare labels. Label is a derived field.
+ observer_.profiles_[0].set_label(string16());
+ profiles()[0]->set_label(string16());
ASSERT_EQ(observer_.profiles_[0], *profiles()[0]);
}
@@ -340,6 +343,10 @@ TEST_F(AutoFillDialogControllerTest, TwoProfiles) {
// Contents should match. With the exception of the |unique_id|.
for (size_t i = 0, count = profiles().size(); i < count; i++) {
profiles()[i]->set_unique_id(observer_.profiles_[i].unique_id());
+
+ // Do not compare labels. Label is a derived field.
+ observer_.profiles_[i].set_label(string16());
+ profiles()[i]->set_label(string16());
ASSERT_EQ(observer_.profiles_[i], *profiles()[i]);
}
}
@@ -470,6 +477,10 @@ TEST_F(AutoFillDialogControllerTest, TwoProfilesDeleteOne) {
// First address should match.
profiles()[0]->set_unique_id(observer_.profiles_[0].unique_id());
+
+ // Do not compare labels. Label is a derived field.
+ observer_.profiles_[0].set_label(string16());
+ profile.set_label(string16());
ASSERT_EQ(observer_.profiles_[0], profile);
}
@@ -558,8 +569,12 @@ TEST_F(AutoFillDialogControllerTest, WaitForDataToLoad) {
// Contents should match.
size_t i = 0;
size_t count = profiles().size();
- for (i = 0; i < count; i++)
+ for (i = 0; i < count; i++) {
+ // Do not compare labels. Label is a derived field.
+ observer_.profiles_[i].set_label(string16());
+ profiles()[i]->set_label(string16());
ASSERT_EQ(observer_.profiles_[i], *profiles()[i]);
+ }
count = credit_cards().size();
for (i = 0; i < count; i++) {
ASSERT_EQ(observer_.credit_cards_[i], *credit_cards()[i]);
@@ -590,6 +605,10 @@ TEST_F(AutoFillDialogControllerTest, ImportedParameters) {
ASSERT_EQ(1UL, observer_.profiles_.size());
ASSERT_EQ(1UL, observer_.credit_cards_.size());
+ // Do not compare labels. Label is a derived field.
+ observer_.profiles_[0].set_label(string16());
+ profile.set_label(string16());
+
// Contents should match.
ASSERT_EQ(observer_.profiles_[0], profile);
ASSERT_EQ(observer_.credit_cards_[0], credit_card);
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac.mm ('k') | chrome/browser/webdata/web_data_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698