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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "cc/trees/layer_tree_host.h" | 20 #include "cc/trees/layer_tree_host.h" |
21 #include "content/child/request_extra_data.h" | 21 #include "content/child/request_extra_data.h" |
22 #include "content/child/service_worker/service_worker_network_provider.h" | 22 #include "content/child/service_worker/service_worker_network_provider.h" |
23 #include "content/common/content_switches_internal.h" | 23 #include "content/common/content_switches_internal.h" |
24 #include "content/common/frame_messages.h" | 24 #include "content/common/frame_messages.h" |
25 #include "content/common/frame_replication_state.h" | 25 #include "content/common/frame_replication_state.h" |
26 #include "content/common/site_isolation_policy.h" | 26 #include "content/common/site_isolation_policy.h" |
27 #include "content/common/ssl_status_serialization.h" | 27 #include "content/common/ssl_status_serialization.h" |
| 28 #include "content/common/text_input_state.h" |
28 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
29 #include "content/public/browser/browser_context.h" | 30 #include "content/public/browser/browser_context.h" |
30 #include "content/public/browser/native_web_keyboard_event.h" | 31 #include "content/public/browser/native_web_keyboard_event.h" |
31 #include "content/public/browser/web_ui_controller_factory.h" | 32 #include "content/public/browser/web_ui_controller_factory.h" |
32 #include "content/public/common/bindings_policy.h" | 33 #include "content/public/common/bindings_policy.h" |
33 #include "content/public/common/browser_side_navigation_policy.h" | 34 #include "content/public/common/browser_side_navigation_policy.h" |
34 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
35 #include "content/public/common/page_zoom.h" | 36 #include "content/public/common/page_zoom.h" |
36 #include "content/public/common/url_constants.h" | 37 #include "content/public/common/url_constants.h" |
37 #include "content/public/common/url_utils.h" | 38 #include "content/public/common/url_utils.h" |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 render_thread_->sink().ClearMessages(); | 1088 render_thread_->sink().ClearMessages(); |
1088 | 1089 |
1089 // Update the IME status and verify if our IME backend sends an IPC message | 1090 // Update the IME status and verify if our IME backend sends an IPC message |
1090 // to activate IMEs. | 1091 // to activate IMEs. |
1091 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); | 1092 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); |
1092 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); | 1093 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); |
1093 EXPECT_TRUE(msg != NULL); | 1094 EXPECT_TRUE(msg != NULL); |
1094 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type()); | 1095 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type()); |
1095 ViewHostMsg_TextInputStateChanged::Param params; | 1096 ViewHostMsg_TextInputStateChanged::Param params; |
1096 ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms); | 1097 ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms); |
1097 ViewHostMsg_TextInputState_Params p = base::get<0>(params); | 1098 TextInputState p = base::get<0>(params); |
1098 ui::TextInputType type = p.type; | 1099 ui::TextInputType type = p.type; |
1099 ui::TextInputMode input_mode = p.mode; | 1100 ui::TextInputMode input_mode = p.mode; |
1100 bool can_compose_inline = p.can_compose_inline; | 1101 bool can_compose_inline = p.can_compose_inline; |
1101 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); | 1102 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); |
1102 EXPECT_EQ(true, can_compose_inline); | 1103 EXPECT_EQ(true, can_compose_inline); |
1103 | 1104 |
1104 // Move the input focus to the second <input> element, where we should | 1105 // Move the input focus to the second <input> element, where we should |
1105 // de-activate IMEs. | 1106 // de-activate IMEs. |
1106 ExecuteJavaScriptForTests("document.getElementById('test2').focus();"); | 1107 ExecuteJavaScriptForTests("document.getElementById('test2').focus();"); |
1107 ProcessPendingMessages(); | 1108 ProcessPendingMessages(); |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 FROM_HERE, | 2349 FROM_HERE, |
2349 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); | 2350 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); |
2350 ExecuteJavaScriptForTests("debugger;"); | 2351 ExecuteJavaScriptForTests("debugger;"); |
2351 | 2352 |
2352 // CloseWhilePaused should resume execution and continue here. | 2353 // CloseWhilePaused should resume execution and continue here. |
2353 EXPECT_FALSE(IsPaused()); | 2354 EXPECT_FALSE(IsPaused()); |
2354 Detach(); | 2355 Detach(); |
2355 } | 2356 } |
2356 | 2357 |
2357 } // namespace content | 2358 } // namespace content |
OLD | NEW |