OLD | NEW |
---|---|
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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 4198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4209 base::Closure ime_call = | 4209 base::Closure ime_call = |
4210 base::Bind(&ui::TextInputClient::InsertText, | 4210 base::Bind(&ui::TextInputClient::InsertText, |
4211 base::Unretained(text_input_client()), base::string16()); | 4211 base::Unretained(text_input_client()), base::string16()); |
4212 for (auto index : active_view_sequence_) { | 4212 for (auto index : active_view_sequence_) { |
4213 ActivateViewForTextInputManager(views_[index], ui::TEXT_INPUT_TYPE_TEXT); | 4213 ActivateViewForTextInputManager(views_[index], ui::TEXT_INPUT_TYPE_TEXT); |
4214 EXPECT_TRUE(!!RunAndReturnIPCSent(ime_call, processes_[index], | 4214 EXPECT_TRUE(!!RunAndReturnIPCSent(ime_call, processes_[index], |
4215 InputMsg_ImeConfirmComposition::ID)); | 4215 InputMsg_ImeConfirmComposition::ID)); |
4216 } | 4216 } |
4217 } | 4217 } |
4218 | 4218 |
4219 // This test makes a specific child frame's view active and then forces the tab | |
4220 // view end current IME composition session by sending out an IME confirm | |
Charlie Reis
2016/06/30 18:43:12
nit: I think a word is missing here?
"force the ta
EhsanK
2016/06/30 19:26:29
Acknowledged.
| |
4221 // composition IPC. The test then verifies that the message is sent to the | |
4222 // active widget's process. | |
4223 TEST_F(InputMethodResultAuraTest, FinishImeCompositionSession) { | |
4224 base::Closure ime_finish_session_call = | |
4225 base::Bind(&RenderWidgetHostViewAura::FinishImeCompositionSession, | |
4226 base::Unretained(tab_view())); | |
4227 for (auto index : active_view_sequence_) { | |
4228 ActivateViewForTextInputManager(views_[index], ui::TEXT_INPUT_TYPE_TEXT); | |
4229 SetHasCompositionTextToTrue(); | |
4230 EXPECT_TRUE(!!RunAndReturnIPCSent(ime_finish_session_call, | |
4231 processes_[index], | |
4232 InputMsg_ImeConfirmComposition::ID)); | |
4233 } | |
4234 } | |
4235 | |
4219 } // namespace content | 4236 } // namespace content |
OLD | NEW |