| 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 #include "ui/views/mus/input_method_mus.h" | 5 #include "ui/views/mus/input_method_mus.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/base/ime/dummy_text_input_client.h" | 13 #include "ui/base/ime/dummy_text_input_client.h" |
| 13 #include "ui/base/ime/input_method_delegate.h" | 14 #include "ui/base/ime/input_method_delegate.h" |
| 14 #include "ui/events/event.h" | 15 #include "ui/events/event.h" |
| 15 #include "ui/views/mus/window_manager_connection.h" | 16 #include "ui/views/mus/window_manager_connection.h" |
| 16 #include "ui/views/test/scoped_views_test_helper.h" | 17 #include "ui/views/test/scoped_views_test_helper.h" |
| 17 | 18 |
| 18 namespace views { | 19 namespace views { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ui::KeyEvent key_event('A', ui::VKEY_A, 0); | 89 ui::KeyEvent key_event('A', ui::VKEY_A, 0); |
| 89 input_method.DispatchKeyEvent(&key_event); | 90 input_method.DispatchKeyEvent(&key_event); |
| 90 | 91 |
| 91 ui::KeyEvent* received_event = text_input_client.WaitUntilInputReceieved(); | 92 ui::KeyEvent* received_event = text_input_client.WaitUntilInputReceieved(); |
| 92 EXPECT_EQ(ui::ET_KEY_PRESSED, received_event->type()); | 93 EXPECT_EQ(ui::ET_KEY_PRESSED, received_event->type()); |
| 93 EXPECT_TRUE(received_event->is_char()); | 94 EXPECT_TRUE(received_event->is_char()); |
| 94 EXPECT_EQ(key_event.GetCharacter(), received_event->GetCharacter()); | 95 EXPECT_EQ(key_event.GetCharacter(), received_event->GetCharacter()); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace views | 98 } // namespace views |
| OLD | NEW |