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

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

Issue 2517843002: Http Bad: Put icon on the left of http warning message on Views (Closed)
Patch Set: add test Created 4 years, 1 month 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_popup_layout_model_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc b/chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc
index 22c718874dcdd448206dd14561f3dc0f5540bbed..c22370e28abae1d1a211e7ee4cd55bb641c0c939 100644
--- a/chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc
@@ -50,6 +50,8 @@ class TestAutofillPopupViewDelegate : public AutofillPopupViewDelegate {
suggestions.push_back(Suggestion("", "x", "", 0));
suggestions.push_back(Suggestion("", "", "americanExpressCC", 0));
suggestions.push_back(Suggestion("", "x", "genericCC", 0));
+ // Http warning message.
+ suggestions.push_back(Suggestion("x", "x", "http", -10));
Mathieu 2016/11/22 14:36:45 nit: use the popup_item_id enum instead of -10?
lshang 2016/11/27 04:59:13 Done.
return suggestions;
}
#if !defined(OS_ANDROID)
@@ -102,6 +104,12 @@ TEST_F(AutofillPopupLayoutModelTest, RowWidthWithoutText) {
.GetImageNamed(IDR_AUTOFILL_CC_GENERIC)
.Width(),
layout_model()->RowWidthWithoutText(3, /* with_label= */ true));
+ EXPECT_EQ(base_size + AutofillPopupLayoutModel::kHttpWarningNamePadding +
+ AutofillPopupLayoutModel::kHttpWarningIconPadding +
+ ui::ResourceBundle::GetSharedInstance()
+ .GetImageNamed(IDR_AUTOFILL_HTTP_WARNING)
+ .Width(),
+ layout_model()->RowWidthWithoutText(4, /* with_label= */ true));
}
#endif

Powered by Google App Engine
This is Rietveld 408576698