- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / autofill / decorated_textfield_unittest.cc
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.
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(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());
21 }
22
23 }  // namespace autofill