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 "base/basictypes.h" | 5 #include <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
6 #include "base/bind.h" | 8 #include "base/bind.h" |
7 #include "base/callback.h" | 9 #include "base/callback.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" |
10 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
11 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
13 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
14 #include "base/time/time.h" | 17 #include "base/time/time.h" |
15 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
| 19 #include "build/build_config.h" |
16 #include "content/child/request_extra_data.h" | 20 #include "content/child/request_extra_data.h" |
17 #include "content/child/service_worker/service_worker_network_provider.h" | 21 #include "content/child/service_worker/service_worker_network_provider.h" |
18 #include "content/common/frame_messages.h" | 22 #include "content/common/frame_messages.h" |
19 #include "content/common/site_isolation_policy.h" | 23 #include "content/common/site_isolation_policy.h" |
20 #include "content/common/ssl_status_serialization.h" | 24 #include "content/common/ssl_status_serialization.h" |
21 #include "content/common/view_messages.h" | 25 #include "content/common/view_messages.h" |
22 #include "content/public/browser/browser_context.h" | 26 #include "content/public/browser/browser_context.h" |
23 #include "content/public/browser/native_web_keyboard_event.h" | 27 #include "content/public/browser/native_web_keyboard_event.h" |
24 #include "content/public/browser/web_ui_controller_factory.h" | 28 #include "content/public/browser/web_ui_controller_factory.h" |
25 #include "content/public/common/bindings_policy.h" | 29 #include "content/public/common/bindings_policy.h" |
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 | 2128 |
2125 view()->SetHandlingInputEventForTesting(true); | 2129 view()->SetHandlingInputEventForTesting(true); |
2126 ExecuteJavaScriptForTests("document.getElementById('test').focus();"); | 2130 ExecuteJavaScriptForTests("document.getElementById('test').focus();"); |
2127 | 2131 |
2128 bool is_input_type_called = false; | 2132 bool is_input_type_called = false; |
2129 bool is_selection_called = false; | 2133 bool is_selection_called = false; |
2130 size_t last_input_type = 0; | 2134 size_t last_input_type = 0; |
2131 size_t last_selection = 0; | 2135 size_t last_selection = 0; |
2132 | 2136 |
2133 for (size_t i = 0; i < render_thread_->sink().message_count(); ++i) { | 2137 for (size_t i = 0; i < render_thread_->sink().message_count(); ++i) { |
2134 const uint32 type = render_thread_->sink().GetMessageAt(i)->type(); | 2138 const uint32_t type = render_thread_->sink().GetMessageAt(i)->type(); |
2135 if (type == ViewHostMsg_TextInputStateChanged::ID) { | 2139 if (type == ViewHostMsg_TextInputStateChanged::ID) { |
2136 is_input_type_called = true; | 2140 is_input_type_called = true; |
2137 last_input_type = i; | 2141 last_input_type = i; |
2138 } else if (type == ViewHostMsg_SelectionChanged::ID) { | 2142 } else if (type == ViewHostMsg_SelectionChanged::ID) { |
2139 is_selection_called = true; | 2143 is_selection_called = true; |
2140 last_selection = i; | 2144 last_selection = i; |
2141 } | 2145 } |
2142 } | 2146 } |
2143 | 2147 |
2144 EXPECT_TRUE(is_input_type_called); | 2148 EXPECT_TRUE(is_input_type_called); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 FROM_HERE, | 2734 FROM_HERE, |
2731 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); | 2735 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); |
2732 ExecuteJavaScriptForTests("debugger;"); | 2736 ExecuteJavaScriptForTests("debugger;"); |
2733 | 2737 |
2734 // CloseWhilePaused should resume execution and continue here. | 2738 // CloseWhilePaused should resume execution and continue here. |
2735 EXPECT_FALSE(IsPaused()); | 2739 EXPECT_FALSE(IsPaused()); |
2736 Detach(); | 2740 Detach(); |
2737 } | 2741 } |
2738 | 2742 |
2739 } // namespace content | 2743 } // namespace content |
OLD | NEW |