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 "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 | 1294 |
1295 SendInputEventACK(WebInputEvent::RawKeyDown, | 1295 SendInputEventACK(WebInputEvent::RawKeyDown, |
1296 INPUT_EVENT_ACK_STATE_CONSUMED); | 1296 INPUT_EVENT_ACK_STATE_CONSUMED); |
1297 | 1297 |
1298 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1298 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1299 } | 1299 } |
1300 | 1300 |
1301 TEST_F(RenderWidgetHostTest, InputRouterReceivesMoveCaret_ACK) { | 1301 TEST_F(RenderWidgetHostTest, InputRouterReceivesMoveCaret_ACK) { |
1302 host_->SetupForInputRouterTest(); | 1302 host_->SetupForInputRouterTest(); |
1303 | 1303 |
1304 host_->OnMessageReceived(ViewHostMsg_MoveCaret_ACK(0)); | 1304 host_->OnMessageReceived(InputHostMsg_MoveCaret_ACK(0)); |
1305 | 1305 |
1306 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1306 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1307 } | 1307 } |
1308 | 1308 |
1309 TEST_F(RenderWidgetHostTest, InputRouterReceivesSelectRange_ACK) { | 1309 TEST_F(RenderWidgetHostTest, InputRouterReceivesSelectRange_ACK) { |
1310 host_->SetupForInputRouterTest(); | 1310 host_->SetupForInputRouterTest(); |
1311 | 1311 |
1312 host_->OnMessageReceived(ViewHostMsg_SelectRange_ACK(0)); | 1312 host_->OnMessageReceived(InputHostMsg_SelectRange_ACK(0)); |
1313 | 1313 |
1314 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1314 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1315 } | 1315 } |
1316 | 1316 |
1317 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 1317 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
1318 host_->SetupForInputRouterTest(); | 1318 host_->SetupForInputRouterTest(); |
1319 | 1319 |
1320 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 1320 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
1321 | 1321 |
1322 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1322 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 | 1488 |
1489 ASSERT_TRUE(host_->is_hidden()); | 1489 ASSERT_TRUE(host_->is_hidden()); |
1490 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); | 1490 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); |
1491 ASSERT_FALSE(host_->is_hidden()); | 1491 ASSERT_FALSE(host_->is_hidden()); |
1492 | 1492 |
1493 // Make sure the input router is in a fresh state. | 1493 // Make sure the input router is in a fresh state. |
1494 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1494 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1495 } | 1495 } |
1496 | 1496 |
1497 } // namespace content | 1497 } // namespace content |
OLD | NEW |