Chromium Code Reviews| 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 |