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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 | 1306 |
1307 SendInputEventACK(WebInputEvent::RawKeyDown, | 1307 SendInputEventACK(WebInputEvent::RawKeyDown, |
1308 INPUT_EVENT_ACK_STATE_CONSUMED); | 1308 INPUT_EVENT_ACK_STATE_CONSUMED); |
1309 | 1309 |
1310 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1310 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1311 } | 1311 } |
1312 | 1312 |
1313 TEST_F(RenderWidgetHostTest, InputRouterReceivesMoveCaret_ACK) { | 1313 TEST_F(RenderWidgetHostTest, InputRouterReceivesMoveCaret_ACK) { |
1314 host_->SetupForInputRouterTest(); | 1314 host_->SetupForInputRouterTest(); |
1315 | 1315 |
1316 host_->OnMessageReceived(ViewHostMsg_MoveCaret_ACK(0)); | 1316 host_->OnMessageReceived(InputHostMsg_MoveCaret_ACK(0)); |
1317 | 1317 |
1318 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1318 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1319 } | 1319 } |
1320 | 1320 |
1321 TEST_F(RenderWidgetHostTest, InputRouterReceivesSelectRange_ACK) { | 1321 TEST_F(RenderWidgetHostTest, InputRouterReceivesSelectRange_ACK) { |
1322 host_->SetupForInputRouterTest(); | 1322 host_->SetupForInputRouterTest(); |
1323 | 1323 |
1324 host_->OnMessageReceived(ViewHostMsg_SelectRange_ACK(0)); | 1324 host_->OnMessageReceived(InputHostMsg_SelectRange_ACK(0)); |
1325 | 1325 |
1326 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1326 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
1327 } | 1327 } |
1328 | 1328 |
1329 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 1329 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
1330 host_->SetupForInputRouterTest(); | 1330 host_->SetupForInputRouterTest(); |
1331 | 1331 |
1332 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 1332 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
1333 | 1333 |
1334 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 1334 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 | 1500 |
1501 ASSERT_TRUE(host_->is_hidden()); | 1501 ASSERT_TRUE(host_->is_hidden()); |
1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); | 1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); |
1503 ASSERT_FALSE(host_->is_hidden()); | 1503 ASSERT_FALSE(host_->is_hidden()); |
1504 | 1504 |
1505 // Make sure the input router is in a fresh state. | 1505 // Make sure the input router is in a fresh state. |
1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1507 } | 1507 } |
1508 | 1508 |
1509 } // namespace content | 1509 } // namespace content |
OLD | NEW |