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

Side by Side Diff: chrome/browser/ui/views/payments/validating_textfield_unittest.cc

Issue 2964453002: Use style::CONTEXT_TEXTFIELD for Combobox and Textfield (Closed)
Patch Set: Rebase on top of https://codereview.chromium.org/2957263002 Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views/payments/validating_textfield.h" 5 #include "chrome/browser/ui/views/payments/validating_textfield.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/ui/views/payments/validation_delegate.h" 13 #include "chrome/browser/ui/views/payments/validation_delegate.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/views/controls/textfield/textfield.h" 15 #include "ui/views/controls/textfield/textfield.h"
16 #include "ui/views/test/views_test_base.h"
16 17
17 namespace payments { 18 namespace payments {
18 19
19 class ValidatingTextfieldTest : public testing::Test { 20 class ValidatingTextfieldTest : public views::ViewsTestBase {
20 public: 21 public:
21 ValidatingTextfieldTest() {} 22 ValidatingTextfieldTest() {}
22 ~ValidatingTextfieldTest() override {} 23 ~ValidatingTextfieldTest() override {}
23 24
24 protected: 25 protected:
25 class TestValidationDelegate : public ValidationDelegate { 26 class TestValidationDelegate : public ValidationDelegate {
26 public: 27 public:
27 TestValidationDelegate() {} 28 TestValidationDelegate() {}
28 ~TestValidationDelegate() override {} 29 ~TestValidationDelegate() override {}
29 30
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // On further text adjustements, the validation runs now. Set a valid string 72 // On further text adjustements, the validation runs now. Set a valid string
72 // (<=5 characters). 73 // (<=5 characters).
73 textfield->SetText(base::ASCIIToUTF16("good")); 74 textfield->SetText(base::ASCIIToUTF16("good"));
74 textfield->OnContentsChanged(); 75 textfield->OnContentsChanged();
75 76
76 // No longer invalid. 77 // No longer invalid.
77 EXPECT_FALSE(textfield->invalid()); 78 EXPECT_FALSE(textfield->invalid());
78 } 79 }
79 80
80 } // namespace payments 81 } // namespace payments
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc ('k') | ui/views/cocoa/bridged_native_widget_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698