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

Side by Side Diff: ui/aura/mus/input_method_mus_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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/aura/mus/input_method_mus.h" 5 #include "ui/aura/mus/input_method_mus.h"
6 6
7 #include "services/ui/public/interfaces/ime/ime.mojom.h" 7 #include "services/ui/public/interfaces/ime/ime.mojom.h"
8 #include "ui/aura/test/aura_test_base.h" 8 #include "ui/aura/test/aura_test_base.h"
9 #include "ui/aura/test/mus/input_method_mus_test_api.h" 9 #include "ui/aura/test/mus/input_method_mus_test_api.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 &input_method_mus, key_event, std::move(callback)); 194 &input_method_mus, key_event, std::move(callback));
195 ASSERT_TRUE(!details.dispatcher_destroyed && !details.target_destroyed); 195 ASSERT_TRUE(!details.dispatcher_destroyed && !details.target_destroyed);
196 // The event should have been queued. 196 // The event should have been queued.
197 ASSERT_EQ(1u, test_input_method.process_key_event_callbacks()->size()); 197 ASSERT_EQ(1u, test_input_method.process_key_event_callbacks()->size());
198 // Callback should not have been run yet. 198 // Callback should not have been run yet.
199 EXPECT_FALSE(was_event_result_callback_run); 199 EXPECT_FALSE(was_event_result_callback_run);
200 (*test_input_method.process_key_event_callbacks())[0].Run(false); 200 (*test_input_method.process_key_event_callbacks())[0].Run(false);
201 201
202 // Callback should have been run. 202 // Callback should have been run.
203 EXPECT_TRUE(was_event_result_callback_run); 203 EXPECT_TRUE(was_event_result_callback_run);
204 EXPECT_TRUE(input_method_delegate.was_dispatch_key_event_post_ime_called());
205 } 204 }
206 205
207 } // namespace aura 206 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698