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

Side by Side Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 682843003: Remove redundant SetUp() override from TextfieldTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "ui/views/controls/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 : widget_(NULL), 152 : widget_(NULL),
153 textfield_(NULL), 153 textfield_(NULL),
154 model_(NULL), 154 model_(NULL),
155 input_method_(NULL), 155 input_method_(NULL),
156 on_before_user_action_(0), 156 on_before_user_action_(0),
157 on_after_user_action_(0), 157 on_after_user_action_(0),
158 copied_to_clipboard_(ui::CLIPBOARD_TYPE_LAST) { 158 copied_to_clipboard_(ui::CLIPBOARD_TYPE_LAST) {
159 } 159 }
160 160
161 // ::testing::Test: 161 // ::testing::Test:
162 void SetUp() override { ViewsTestBase::SetUp(); }
163
164 void TearDown() override { 162 void TearDown() override {
165 if (widget_) 163 if (widget_)
166 widget_->Close(); 164 widget_->Close();
167 ViewsTestBase::TearDown(); 165 ViewsTestBase::TearDown();
168 } 166 }
169 167
170 ui::ClipboardType GetAndResetCopiedToClipboard() { 168 ui::ClipboardType GetAndResetCopiedToClipboard() {
171 ui::ClipboardType clipboard_type = copied_to_clipboard_; 169 ui::ClipboardType clipboard_type = copied_to_clipboard_;
172 copied_to_clipboard_ = ui::CLIPBOARD_TYPE_LAST; 170 copied_to_clipboard_ = ui::CLIPBOARD_TYPE_LAST;
173 return clipboard_type; 171 return clipboard_type;
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 TextfieldDestroyerController controller(textfield_); 2060 TextfieldDestroyerController controller(textfield_);
2063 EXPECT_TRUE(controller.target()); 2061 EXPECT_TRUE(controller.target());
2064 2062
2065 // Send a key to trigger OnKeyEvent(). 2063 // Send a key to trigger OnKeyEvent().
2066 SendKeyEvent('X'); 2064 SendKeyEvent('X');
2067 2065
2068 EXPECT_FALSE(controller.target()); 2066 EXPECT_FALSE(controller.target());
2069 } 2067 }
2070 2068
2071 } // namespace views 2069 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698