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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 21724002: rAc: try really hard not to ellipsize addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more Created 7 years, 4 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/ui/autofill/autofill_dialog_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index 1db64966b4317c08778a5439a6a2eb1f7ca9db89..24782e85a8b43142ffd00b5991079102ed89679e 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -891,10 +891,12 @@ TEST_F(AutofillDialogControllerTest, AutofillProfileVariants) {
email_model->ActivatedAt(0);
EXPECT_EQ(kEmail1,
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ controller()->SuggestionStateForSection(SECTION_EMAIL).
+ vertically_compact_text);
email_model->ActivatedAt(1);
EXPECT_EQ(kEmail2,
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ controller()->SuggestionStateForSection(SECTION_EMAIL).
+ vertically_compact_text);
controller()->EditClickedForSection(SECTION_EMAIL);
const DetailInputs& inputs =
@@ -922,7 +924,8 @@ TEST_F(AutofillDialogControllerTest, SuggestValidEmail) {
controller()->MenuModelForSection(SECTION_EMAIL)->ActivatedAt(0);
EXPECT_EQ(kValidEmail,
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ controller()->SuggestionStateForSection(SECTION_EMAIL).
+ vertically_compact_text);
}
TEST_F(AutofillDialogControllerTest, DoNotSuggestInvalidEmail) {
@@ -1447,22 +1450,23 @@ TEST_F(AutofillDialogControllerTest, EditClickedCancelled) {
controller()->RequestedFieldsForSection(SECTION_EMAIL);
EXPECT_EQ(string16(), inputs0[0].initial_value);
EXPECT_EQ(kEmail,
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ controller()->SuggestionStateForSection(SECTION_EMAIL).
+ vertically_compact_text);
// When edited, the initial_value should contain the value.
controller()->EditClickedForSection(SECTION_EMAIL);
const DetailInputs& inputs1 =
controller()->RequestedFieldsForSection(SECTION_EMAIL);
EXPECT_EQ(kEmail, inputs1[0].initial_value);
- EXPECT_EQ(string16(),
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ EXPECT_FALSE(controller()->SuggestionStateForSection(SECTION_EMAIL).visible);
// When edit is cancelled, the initial_value should be empty.
controller()->EditCancelledForSection(SECTION_EMAIL);
const DetailInputs& inputs2 =
controller()->RequestedFieldsForSection(SECTION_EMAIL);
EXPECT_EQ(kEmail,
- controller()->SuggestionStateForSection(SECTION_EMAIL).text);
+ controller()->SuggestionStateForSection(SECTION_EMAIL).
+ vertically_compact_text);
EXPECT_EQ(string16(), inputs2[0].initial_value);
}

Powered by Google App Engine
This is Rietveld 408576698