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

Unified Diff: ui/base/ime/input_method_chromeos_unittest.cc

Issue 2957173004: Make DispatchKeyEventPostIME() asynchronous.
Patch Set: cleanup. Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/ime/input_method_chromeos_unittest.cc
diff --git a/ui/base/ime/input_method_chromeos_unittest.cc b/ui/base/ime/input_method_chromeos_unittest.cc
index 174f26c565abffe418ee0f82b0df2cc64470ebf4..b0aa0dc389da3634ae2921dcd5625cf837fd4c0f 100644
--- a/ui/base/ime/input_method_chromeos_unittest.cc
+++ b/ui/base/ime/input_method_chromeos_unittest.cc
@@ -77,13 +77,19 @@ class TestableInputMethodChromeOS : public InputMethodChromeOS {
};
// Overridden from InputMethodChromeOS:
- ui::EventDispatchDetails ProcessKeyEventPostIME(ui::KeyEvent* key_event,
- bool handled) override {
+ ui::EventDispatchDetails ProcessKeyEventPostIME(
+ ui::KeyEvent* key_event,
+ std::unique_ptr<AckCallback> ack_callback,
+ bool skip_process_filtered,
+ bool handled) override {
ui::EventDispatchDetails details =
- InputMethodChromeOS::ProcessKeyEventPostIME(key_event, handled);
- process_key_event_post_ime_args_.event = key_event;
- process_key_event_post_ime_args_.handled = handled;
- ++process_key_event_post_ime_call_count_;
+ InputMethodChromeOS::ProcessKeyEventPostIME(
+ key_event, std::move(ack_callback), skip_process_filtered, handled);
+ if (!skip_process_filtered) {
+ process_key_event_post_ime_args_.event = key_event;
+ process_key_event_post_ime_args_.handled = handled;
+ ++process_key_event_post_ime_call_count_;
+ }
return details;
}
@@ -960,7 +966,7 @@ TEST_F(InputMethodChromeOSKeyEventTest, DeadKeyPressTest) {
0,
DomKey::DeadKeyFromCombiningCharacter('^'),
EventTimeForNow());
- ime_->ProcessKeyEventPostIME(&eventA, true);
+ ime_->ProcessKeyEventPostIME(&eventA, nullptr, false, true);
const ui::KeyEvent& key_event = dispatched_key_event_;

Powered by Google App Engine
This is Rietveld 408576698