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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 render_thread_->sink().ClearMessages(); | 1230 render_thread_->sink().ClearMessages(); |
1230 | 1231 |
1231 // Update the IME status and verify if our IME backend sends an IPC message | 1232 // Update the IME status and verify if our IME backend sends an IPC message |
1232 // to activate IMEs. | 1233 // to activate IMEs. |
1233 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); | 1234 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); |
1234 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); | 1235 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); |
1235 EXPECT_TRUE(msg != NULL); | 1236 EXPECT_TRUE(msg != NULL); |
1236 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type()); | 1237 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type()); |
1237 ViewHostMsg_TextInputStateChanged::Param params; | 1238 ViewHostMsg_TextInputStateChanged::Param params; |
1238 ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms); | 1239 ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms); |
1239 ViewHostMsg_TextInputState_Params p = base::get<0>(params); | 1240 TextInputState p = base::get<0>(params); |
1240 ui::TextInputType type = p.type; | 1241 ui::TextInputType type = p.type; |
1241 ui::TextInputMode input_mode = p.mode; | 1242 ui::TextInputMode input_mode = p.mode; |
1242 bool can_compose_inline = p.can_compose_inline; | 1243 bool can_compose_inline = p.can_compose_inline; |
1243 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); | 1244 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); |
1244 EXPECT_EQ(true, can_compose_inline); | 1245 EXPECT_EQ(true, can_compose_inline); |
1245 | 1246 |
1246 // Move the input focus to the second <input> element, where we should | 1247 // Move the input focus to the second <input> element, where we should |
1247 // de-activate IMEs. | 1248 // de-activate IMEs. |
1248 ExecuteJavaScriptForTests("document.getElementById('test2').focus();"); | 1249 ExecuteJavaScriptForTests("document.getElementById('test2').focus();"); |
1249 ProcessPendingMessages(); | 1250 ProcessPendingMessages(); |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 FROM_HERE, | 2476 FROM_HERE, |
2476 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); | 2477 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); |
2477 ExecuteJavaScriptForTests("debugger;"); | 2478 ExecuteJavaScriptForTests("debugger;"); |
2478 | 2479 |
2479 // CloseWhilePaused should resume execution and continue here. | 2480 // CloseWhilePaused should resume execution and continue here. |
2480 EXPECT_FALSE(IsPaused()); | 2481 EXPECT_FALSE(IsPaused()); |
2481 Detach(); | 2482 Detach(); |
2482 } | 2483 } |
2483 | 2484 |
2484 } // namespace content | 2485 } // namespace content |
OLD | NEW |