| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |