| Index: ui/base/ime/input_method_base_unittest.cc
|
| diff --git a/ui/base/ime/input_method_base_unittest.cc b/ui/base/ime/input_method_base_unittest.cc
|
| index 129d3c531e74d2c53bc3d544826d7e58b49e9944..55db6f9d19fcd1017746eeef1331e1075579e603 100644
|
| --- a/ui/base/ime/input_method_base_unittest.cc
|
| +++ b/ui/base/ime/input_method_base_unittest.cc
|
| @@ -198,27 +198,6 @@ class MockInputMethodObserver : public InputMethodObserver {
|
| DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver);
|
| };
|
|
|
| -class MockTextInputClient : public DummyTextInputClient {
|
| - public:
|
| - MockTextInputClient()
|
| - : shown_event_count_(0), updated_event_count_(0), hidden_event_count_(0) {
|
| - }
|
| - ~MockTextInputClient() override {}
|
| -
|
| - void OnCandidateWindowShown() override { ++shown_event_count_; }
|
| - void OnCandidateWindowUpdated() override { ++updated_event_count_; }
|
| - void OnCandidateWindowHidden() override { ++hidden_event_count_; }
|
| -
|
| - int shown_event_count() const { return shown_event_count_; }
|
| - int updated_event_count() const { return updated_event_count_; }
|
| - int hidden_event_count() const { return hidden_event_count_; }
|
| -
|
| - private:
|
| - int shown_event_count_;
|
| - int updated_event_count_;
|
| - int hidden_event_count_;
|
| -};
|
| -
|
| typedef ScopedObserver<InputMethod, InputMethodObserver>
|
| InputMethodScopedObserver;
|
|
|
| @@ -338,52 +317,5 @@ TEST_F(InputMethodBaseTest, DetachTextInputClient) {
|
| }
|
| }
|
|
|
| -TEST_F(InputMethodBaseTest, CandidateWindowEvents) {
|
| - MockTextInputClient text_input_client;
|
| -
|
| - {
|
| - ClientChangeVerifier verifier;
|
| - MockInputMethodBase input_method_base(&verifier);
|
| - input_method_base.OnFocus();
|
| -
|
| - verifier.ExpectClientChange(NULL, &text_input_client);
|
| - SetFocusedTextInputClient(&input_method_base, &text_input_client);
|
| -
|
| - EXPECT_EQ(0, text_input_client.shown_event_count());
|
| - EXPECT_EQ(0, text_input_client.updated_event_count());
|
| - EXPECT_EQ(0, text_input_client.hidden_event_count());
|
| -
|
| - input_method_base.OnCandidateWindowShown();
|
| - base::RunLoop().RunUntilIdle();
|
| -
|
| - EXPECT_EQ(1, text_input_client.shown_event_count());
|
| - EXPECT_EQ(0, text_input_client.updated_event_count());
|
| - EXPECT_EQ(0, text_input_client.hidden_event_count());
|
| -
|
| - input_method_base.OnCandidateWindowUpdated();
|
| - base::RunLoop().RunUntilIdle();
|
| -
|
| - EXPECT_EQ(1, text_input_client.shown_event_count());
|
| - EXPECT_EQ(1, text_input_client.updated_event_count());
|
| - EXPECT_EQ(0, text_input_client.hidden_event_count());
|
| -
|
| - input_method_base.OnCandidateWindowHidden();
|
| - base::RunLoop().RunUntilIdle();
|
| -
|
| - EXPECT_EQ(1, text_input_client.shown_event_count());
|
| - EXPECT_EQ(1, text_input_client.updated_event_count());
|
| - EXPECT_EQ(1, text_input_client.hidden_event_count());
|
| -
|
| - input_method_base.OnCandidateWindowShown();
|
| - }
|
| -
|
| - // If InputMethod is deleted immediately after an event happens, but before
|
| - // its callback is invoked, the callback will be cancelled.
|
| - base::RunLoop().RunUntilIdle();
|
| - EXPECT_EQ(1, text_input_client.shown_event_count());
|
| - EXPECT_EQ(1, text_input_client.updated_event_count());
|
| - EXPECT_EQ(1, text_input_client.hidden_event_count());
|
| -}
|
| -
|
| } // namespace
|
| } // namespace ui
|
|
|