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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Uses format string for expiration date label. Consistently returns 0 as default (non-experiment) va… Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" 5 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 gfx::RectF element_bounds_; 61 gfx::RectF element_bounds_;
62 gfx::NativeView container_view_; 62 gfx::NativeView container_view_;
63 }; 63 };
64 64
65 class AutofillPopupLayoutModelTest : public ChromeRenderViewHostTestHarness { 65 class AutofillPopupLayoutModelTest : public ChromeRenderViewHostTestHarness {
66 public: 66 public:
67 void SetUp() override { 67 void SetUp() override {
68 ChromeRenderViewHostTestHarness::SetUp(); 68 ChromeRenderViewHostTestHarness::SetUp();
69 69
70 delegate_.reset(new TestAutofillPopupViewDelegate(web_contents())); 70 delegate_.reset(new TestAutofillPopupViewDelegate(web_contents()));
71 layout_model_.reset(new AutofillPopupLayoutModel(delegate_.get())); 71 layout_model_.reset(new AutofillPopupLayoutModel(
72 delegate_.get(), false /* is_credit_card_field */));
72 } 73 }
73 74
74 AutofillPopupLayoutModel* layout_model() { return layout_model_.get(); } 75 AutofillPopupLayoutModel* layout_model() { return layout_model_.get(); }
75 76
76 private: 77 private:
77 std::unique_ptr<TestAutofillPopupViewDelegate> delegate_; 78 std::unique_ptr<TestAutofillPopupViewDelegate> delegate_;
78 std::unique_ptr<AutofillPopupLayoutModel> layout_model_; 79 std::unique_ptr<AutofillPopupLayoutModel> layout_model_;
79 }; 80 };
80 81
81 } // namespace 82 } // namespace
(...skipping 17 matching lines...) Expand all
99 EXPECT_EQ(base_size + subtext_increase + 100 EXPECT_EQ(base_size + subtext_increase +
100 AutofillPopupLayoutModel::kIconPadding + 101 AutofillPopupLayoutModel::kIconPadding +
101 ui::ResourceBundle::GetSharedInstance() 102 ui::ResourceBundle::GetSharedInstance()
102 .GetImageNamed(IDR_AUTOFILL_CC_GENERIC) 103 .GetImageNamed(IDR_AUTOFILL_CC_GENERIC)
103 .Width(), 104 .Width(),
104 layout_model()->RowWidthWithoutText(3, /* with_label= */ true)); 105 layout_model()->RowWidthWithoutText(3, /* with_label= */ true));
105 } 106 }
106 #endif 107 #endif
107 108
108 } // namespace autofill 109 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698