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

Unified Diff: chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc

Issue 135813002: Revert of Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc
diff --git a/chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc b/chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9128fe1c64e789f1b21f8d83aed3ed1d1951b7b9
--- /dev/null
+++ b/chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc
@@ -0,0 +1,23 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/views/autofill/decorated_textfield.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/views/controls/button/label_button.h"
+
+namespace autofill {
+
+TEST(DecoratedTextfieldTest, HeightMatchesButton) {
+ DecoratedTextfield textfield(base::ASCIIToUTF16("default"),
+ base::ASCIIToUTF16("placeholder"),
+ NULL);
+ views::LabelButton button(NULL, base::ASCIIToUTF16("anyoldtext"));;
+ button.SetStyle(views::Button::STYLE_BUTTON);
+ EXPECT_EQ(button.GetPreferredSize().height() -
+ DecoratedTextfield::kMagicInsetNumber,
+ textfield.GetPreferredSize().height());
+}
+
+} // namespace autofill
« no previous file with comments | « chrome/browser/ui/views/autofill/decorated_textfield.cc ('k') | chrome/browser/ui/views/cookie_info_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698