Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / views / autofill / decorated_textfield_unittest.cc
blobe8b2fe838b1a06a54e0728d87f109b2d2be4fcf7
1 // Copyright 2013 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.
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"
10 namespace autofill {
12 TEST(DecoratedTextfieldTest, HeightMatchesButton) {
13 DecoratedTextfield textfield(ASCIIToUTF16("default"),
14 ASCIIToUTF16("placeholder"),
15 NULL);
16 views::LabelButton button(NULL, ASCIIToUTF16("anyoldtext"));;
17 button.SetStyle(views::Button::STYLE_BUTTON);
18 EXPECT_EQ(button.GetPreferredSize().height() -
19 DecoratedTextfield::kMagicInsetNumber,
20 textfield.GetPreferredSize().height());
23 } // namespace autofill