| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/base/ime/input_method_base.h" | 5 #include "ui/base/ime/input_method_base.h" |
| 6 | 6 |
| 7 #include "base/gtest_prod_util.h" | 7 #include "base/gtest_prod_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 198 } |
| 199 virtual void OnFocus() OVERRIDE { | 199 virtual void OnFocus() OVERRIDE { |
| 200 } | 200 } |
| 201 virtual void OnBlur() OVERRIDE { | 201 virtual void OnBlur() OVERRIDE { |
| 202 } | 202 } |
| 203 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE { | 203 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE { |
| 204 } | 204 } |
| 205 virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE { | 205 virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE { |
| 206 verifier_->OnTextInputStateChanged(client); | 206 verifier_->OnTextInputStateChanged(client); |
| 207 } | 207 } |
| 208 virtual void OnShowImeIfNeeded() OVERRIDE { |
| 209 } |
| 208 virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { | 210 virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { |
| 209 } | 211 } |
| 210 | 212 |
| 211 ClientChangeVerifier* verifier_; | 213 ClientChangeVerifier* verifier_; |
| 212 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); | 214 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); |
| 213 }; | 215 }; |
| 214 | 216 |
| 215 class MockTextInputClient : public DummyTextInputClient { | 217 class MockTextInputClient : public DummyTextInputClient { |
| 216 public: | 218 public: |
| 217 MockTextInputClient() | 219 MockTextInputClient() |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // If InputMethod is deleted immediately after an event happens, but before | 389 // If InputMethod is deleted immediately after an event happens, but before |
| 388 // its callback is invoked, the callback will be cancelled. | 390 // its callback is invoked, the callback will be cancelled. |
| 389 base::RunLoop().RunUntilIdle(); | 391 base::RunLoop().RunUntilIdle(); |
| 390 EXPECT_EQ(1, text_input_client.shown_event_count()); | 392 EXPECT_EQ(1, text_input_client.shown_event_count()); |
| 391 EXPECT_EQ(1, text_input_client.updated_event_count()); | 393 EXPECT_EQ(1, text_input_client.updated_event_count()); |
| 392 EXPECT_EQ(1, text_input_client.hidden_event_count()); | 394 EXPECT_EQ(1, text_input_client.hidden_event_count()); |
| 393 } | 395 } |
| 394 | 396 |
| 395 } // namespace | 397 } // namespace |
| 396 } // namespace ui | 398 } // namespace ui |
| OLD | NEW |