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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 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 "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h" | 13 #include "chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h" |
13 #include "content/public/test/test_browser_thread_bundle.h" | 14 #include "content/public/test/test_browser_thread_bundle.h" |
14 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "ui/base/ime/ime_bridge.h" | 17 #include "ui/base/ime/ime_bridge.h" |
17 #include "ui/events/event.h" | 18 #include "ui/events/event.h" |
18 #include "ui/events/event_constants.h" | 19 #include "ui/events/event_constants.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 192 |
192 // Test that Ctrl-C, Ctrl-X, and Ctrl-V are not handled. | 193 // Test that Ctrl-C, Ctrl-X, and Ctrl-V are not handled. |
193 TEST_F(InputMethodBridgeChromeOSTest, ClipboardAccelerators) { | 194 TEST_F(InputMethodBridgeChromeOSTest, ClipboardAccelerators) { |
194 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_C, ui::DomCode::US_C, | 195 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_C, ui::DomCode::US_C, |
195 ui::EF_CONTROL_DOWN, 'C'))); | 196 ui::EF_CONTROL_DOWN, 'C'))); |
196 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_X, ui::DomCode::US_X, | 197 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_X, ui::DomCode::US_X, |
197 ui::EF_CONTROL_DOWN, 'X'))); | 198 ui::EF_CONTROL_DOWN, 'X'))); |
198 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_V, ui::DomCode::US_V, | 199 EXPECT_FALSE(ProcessKeyEvent(UnicodeKeyPress(ui::VKEY_V, ui::DomCode::US_V, |
199 ui::EF_CONTROL_DOWN, 'V'))); | 200 ui::EF_CONTROL_DOWN, 'V'))); |
200 } | 201 } |
OLD | NEW |