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

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: Fixes compile error. 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
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_layout_model.cc ('k') | components/autofill/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 gfx::RectF element_bounds_; 67 gfx::RectF element_bounds_;
68 gfx::NativeView container_view_; 68 gfx::NativeView container_view_;
69 }; 69 };
70 70
71 class AutofillPopupLayoutModelTest : public ChromeRenderViewHostTestHarness { 71 class AutofillPopupLayoutModelTest : public ChromeRenderViewHostTestHarness {
72 public: 72 public:
73 void SetUp() override { 73 void SetUp() override {
74 ChromeRenderViewHostTestHarness::SetUp(); 74 ChromeRenderViewHostTestHarness::SetUp();
75 75
76 delegate_.reset(new TestAutofillPopupViewDelegate(web_contents())); 76 delegate_.reset(new TestAutofillPopupViewDelegate(web_contents()));
77 layout_model_.reset(new AutofillPopupLayoutModel(delegate_.get())); 77 layout_model_.reset(new AutofillPopupLayoutModel(
78 delegate_.get(), false /* is_credit_card_field */));
78 } 79 }
79 80
80 AutofillPopupLayoutModel* layout_model() { return layout_model_.get(); } 81 AutofillPopupLayoutModel* layout_model() { return layout_model_.get(); }
81 82
82 private: 83 private:
83 std::unique_ptr<TestAutofillPopupViewDelegate> delegate_; 84 std::unique_ptr<TestAutofillPopupViewDelegate> delegate_;
84 std::unique_ptr<AutofillPopupLayoutModel> layout_model_; 85 std::unique_ptr<AutofillPopupLayoutModel> layout_model_;
85 }; 86 };
86 87
87 } // namespace 88 } // namespace
(...skipping 21 matching lines...) Expand all
109 .Width(), 110 .Width(),
110 layout_model()->RowWidthWithoutText(3, /* with_label= */ true)); 111 layout_model()->RowWidthWithoutText(3, /* with_label= */ true));
111 EXPECT_EQ(base_size + AutofillPopupLayoutModel::kHttpWarningNamePadding + 112 EXPECT_EQ(base_size + AutofillPopupLayoutModel::kHttpWarningNamePadding +
112 AutofillPopupLayoutModel::kHttpWarningIconPadding + 113 AutofillPopupLayoutModel::kHttpWarningIconPadding +
113 layout_model()->GetIconImage(4).width(), 114 layout_model()->GetIconImage(4).width(),
114 layout_model()->RowWidthWithoutText(4, /* with_label= */ true)); 115 layout_model()->RowWidthWithoutText(4, /* with_label= */ true));
115 } 116 }
116 #endif 117 #endif
117 118
118 } // namespace autofill 119 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_layout_model.cc ('k') | components/autofill/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698