Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: ui/base/ime/input_method_ibus_unittest.cc

Issue 15816003: Supports unicode composition(Ctrl+Shift+U) with C-S pressed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a TODO. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/input_method_ibus.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <X11/Xlib.h> 5 #include <X11/Xlib.h>
6 #undef Bool 6 #undef Bool
7 #undef FocusIn 7 #undef FocusIn
8 #undef FocusOut 8 #undef FocusOut
9 #undef None 9 #undef None
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 struct IBusKeyEventFromNativeKeyEventResult { 85 struct IBusKeyEventFromNativeKeyEventResult {
86 IBusKeyEventFromNativeKeyEventResult() : keyval(0), keycode(0), state(0) {} 86 IBusKeyEventFromNativeKeyEventResult() : keyval(0), keycode(0), state(0) {}
87 uint32 keyval; 87 uint32 keyval;
88 uint32 keycode; 88 uint32 keycode;
89 uint32 state; 89 uint32 state;
90 }; 90 };
91 91
92 // InputMethodIBus override. 92 // InputMethodIBus override.
93 virtual void ProcessKeyEventPostIME(const base::NativeEvent& native_key_event, 93 virtual void ProcessKeyEventPostIME(const base::NativeEvent& native_key_event,
94 uint32 ibus_keyval, 94 uint32 ibus_keyval,
95 uint32 ibus_keycode,
96 uint32 ibus_state,
95 bool handled) OVERRIDE { 97 bool handled) OVERRIDE {
96 process_key_event_post_ime_args_.event = *native_key_event; 98 process_key_event_post_ime_args_.event = *native_key_event;
97 process_key_event_post_ime_args_.ibus_keyval = ibus_keyval; 99 process_key_event_post_ime_args_.ibus_keyval = ibus_keyval;
98 process_key_event_post_ime_args_.handled = handled; 100 process_key_event_post_ime_args_.handled = handled;
99 ++process_key_event_post_ime_call_count_; 101 ++process_key_event_post_ime_call_count_;
100 } 102 }
101 103
102 // We can't call X11 related function without display in unit test, so 104 // We can't call X11 related function without display in unit test, so
103 // override with mock function. 105 // override with mock function.
104 virtual void IBusKeyEventFromNativeKeyEvent( 106 virtual void IBusKeyEventFromNativeKeyEvent(
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 1724
1723 // Do callback. 1725 // Do callback.
1724 success_consume_handler.RunCallback(KEYEVENT_CONSUME); 1726 success_consume_handler.RunCallback(KEYEVENT_CONSUME);
1725 1727
1726 EXPECT_EQ(0, ime_->process_key_event_post_ime_call_count()); 1728 EXPECT_EQ(0, ime_->process_key_event_post_ime_call_count());
1727 } 1729 }
1728 1730
1729 // TODO(nona): Introduce ProcessKeyEventPostIME tests(crbug.com/156593). 1731 // TODO(nona): Introduce ProcessKeyEventPostIME tests(crbug.com/156593).
1730 1732
1731 } // namespace ui 1733 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_ibus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698