OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 textfield_view_(NULL), | 119 textfield_view_(NULL), |
120 model_(NULL), | 120 model_(NULL), |
121 input_method_(NULL), | 121 input_method_(NULL), |
122 on_before_user_action_(0), | 122 on_before_user_action_(0), |
123 on_after_user_action_(0) { | 123 on_after_user_action_(0) { |
124 } | 124 } |
125 | 125 |
126 // ::testing::Test: | 126 // ::testing::Test: |
127 virtual void SetUp() { | 127 virtual void SetUp() { |
128 ViewsTestBase::SetUp(); | 128 ViewsTestBase::SetUp(); |
129 Widget::SetPureViews(true); | |
130 } | 129 } |
131 | 130 |
132 virtual void TearDown() { | 131 virtual void TearDown() { |
133 if (widget_) | 132 if (widget_) |
134 widget_->Close(); | 133 widget_->Close(); |
135 Widget::SetPureViews(false); | |
136 ViewsTestBase::TearDown(); | 134 ViewsTestBase::TearDown(); |
137 } | 135 } |
138 | 136 |
139 // TextfieldController: | 137 // TextfieldController: |
140 virtual void ContentsChanged(Textfield* sender, | 138 virtual void ContentsChanged(Textfield* sender, |
141 const string16& new_contents) { | 139 const string16& new_contents) { |
142 ASSERT_NE(last_contents_, new_contents); | 140 ASSERT_NE(last_contents_, new_contents); |
143 last_contents_ = new_contents; | 141 last_contents_ = new_contents; |
144 } | 142 } |
145 | 143 |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 #else | 1574 #else |
1577 EXPECT_EQ(500U, textfield_->GetCursorPosition()); | 1575 EXPECT_EQ(500U, textfield_->GetCursorPosition()); |
1578 #endif | 1576 #endif |
1579 #endif // !defined(OS_WIN) | 1577 #endif // !defined(OS_WIN) |
1580 | 1578 |
1581 // Reset locale. | 1579 // Reset locale. |
1582 base::i18n::SetICUDefaultLocale(locale); | 1580 base::i18n::SetICUDefaultLocale(locale); |
1583 } | 1581 } |
1584 | 1582 |
1585 } // namespace views | 1583 } // namespace views |
OLD | NEW |