OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/strings/utf_string_conversions.h" | |
6 #include "chrome/browser/ui/views/autofill/decorated_textfield.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 #include "ui/views/controls/button/label_button.h" | |
9 | |
10 namespace autofill { | |
11 | |
12 TEST(DecoratedTextfieldTest, HeightMatchesButton) { | |
13 DecoratedTextfield textfield(base::ASCIIToUTF16("default"), | |
14 base::ASCIIToUTF16("placeholder"), | |
15 NULL); | |
16 views::LabelButton button(NULL, base::ASCIIToUTF16("anyoldtext"));; | |
17 button.SetStyle(views::Button::STYLE_BUTTON); | |
18 EXPECT_EQ(button.GetPreferredSize().height() - | |
19 DecoratedTextfield::kMagicInsetNumber, | |
20 textfield.GetPreferredSize().height()); | |
21 } | |
22 | |
23 } // namespace autofill | |
OLD | NEW |