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

Side by Side Diff: content/public/test/text_input_test_utils.h

Issue 2596193002: Clean up names and remove unnecessary parameter (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void SetFromCurrentState(); 153 void SetFromCurrentState();
154 154
155 // The required setter methods. These setter methods can be used to call 155 // The required setter methods. These setter methods can be used to call
156 // RenderWidgetHostViewBase::TextInputStateChanged with fake, customized 156 // RenderWidgetHostViewBase::TextInputStateChanged with fake, customized
157 // TextInputState. Used for unit-testing on the browser side. 157 // TextInputState. Used for unit-testing on the browser side.
158 void SetType(ui::TextInputType type); 158 void SetType(ui::TextInputType type);
159 void SetMode(ui::TextInputMode mode); 159 void SetMode(ui::TextInputMode mode);
160 void SetFlags(int flags); 160 void SetFlags(int flags);
161 void SetCanComposeInline(bool can_compose_inline); 161 void SetCanComposeInline(bool can_compose_inline);
162 void SetShowImeIfNeeded(bool show_ime_if_needed); 162 void SetShowImeIfNeeded(bool show_ime_if_needed);
163 void SetIsNonImeChange(bool is_non_ime_change);
164 163
165 private: 164 private:
166 std::unique_ptr<TextInputState> text_input_state_; 165 std::unique_ptr<TextInputState> text_input_state_;
167 RenderWidgetHostViewBase* const view_; 166 RenderWidgetHostViewBase* const view_;
168 167
169 DISALLOW_COPY_AND_ASSIGN(TextInputStateSender); 168 DISALLOW_COPY_AND_ASSIGN(TextInputStateSender);
170 }; 169 };
171 170
172 // This class is intended to observe the InputMethod. 171 // This class is intended to observe the InputMethod.
173 class TestInputMethodObserver { 172 class TestInputMethodObserver {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const gfx::Range& range); 227 const gfx::Range& range);
229 228
230 // Returns the total count of NSWindows instances which belong to the currently 229 // Returns the total count of NSWindows instances which belong to the currently
231 // running NSApplication. 230 // running NSApplication.
232 size_t GetOpenNSWindowsCount(); 231 size_t GetOpenNSWindowsCount();
233 #endif 232 #endif
234 233
235 } // namespace content 234 } // namespace content
236 235
237 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_ 236 #endif // CONTENT_PUBLIC_TEST_TEXT_INPUT_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698