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 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Paste); | 2416 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Paste); |
2417 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_PasteAndMatchStyle); | 2417 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_PasteAndMatchStyle); |
2418 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Delete); | 2418 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Delete); |
2419 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_SelectAll); | 2419 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_SelectAll); |
2420 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Unselect); | 2420 TEST_InputRouterRoutes_NOARGS_FromRFH(InputMsg_Unselect); |
2421 | 2421 |
2422 #undef TEST_InputRouterRoutes_NOARGS_FromRFH | 2422 #undef TEST_InputRouterRoutes_NOARGS_FromRFH |
2423 | 2423 |
2424 TEST_F(RenderWidgetHostTest, InputRouterRoutesReplace) { | 2424 TEST_F(RenderWidgetHostTest, InputRouterRoutesReplace) { |
2425 host_->SetupForInputRouterTest(); | 2425 host_->SetupForInputRouterTest(); |
2426 host_->Replace(base::string16()); | 2426 host_->Send(new InputMsg_Replace(host_->GetRoutingID(), base::string16())); |
2427 EXPECT_TRUE(host_->mock_input_router()->send_event_called_); | 2427 EXPECT_TRUE(host_->mock_input_router()->send_event_called_); |
2428 } | 2428 } |
2429 | 2429 |
2430 TEST_F(RenderWidgetHostTest, InputRouterRoutesReplaceMisspelling) { | 2430 TEST_F(RenderWidgetHostTest, InputRouterRoutesReplaceMisspelling) { |
2431 host_->SetupForInputRouterTest(); | 2431 host_->SetupForInputRouterTest(); |
2432 host_->ReplaceMisspelling(base::string16()); | 2432 host_->Send(new InputMsg_ReplaceMisspelling(host_->GetRoutingID(), |
| 2433 base::string16())); |
2433 EXPECT_TRUE(host_->mock_input_router()->send_event_called_); | 2434 EXPECT_TRUE(host_->mock_input_router()->send_event_called_); |
2434 } | 2435 } |
2435 | 2436 |
2436 TEST_F(RenderWidgetHostTest, IgnoreInputEvent) { | 2437 TEST_F(RenderWidgetHostTest, IgnoreInputEvent) { |
2437 host_->SetupForInputRouterTest(); | 2438 host_->SetupForInputRouterTest(); |
2438 | 2439 |
2439 host_->SetIgnoreInputEvents(true); | 2440 host_->SetIgnoreInputEvents(true); |
2440 | 2441 |
2441 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); | 2442 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); |
2442 EXPECT_FALSE(host_->mock_input_router()->sent_keyboard_event_); | 2443 EXPECT_FALSE(host_->mock_input_router()->sent_keyboard_event_); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2618 | 2619 |
2619 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). | 2620 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). |
2620 PressTouchPoint(0, 1); | 2621 PressTouchPoint(0, 1); |
2621 SendTouchEvent(); | 2622 SendTouchEvent(); |
2622 CheckLatencyInfoComponentInMessage( | 2623 CheckLatencyInfoComponentInMessage( |
2623 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); | 2624 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); |
2624 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); | 2625 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); |
2625 } | 2626 } |
2626 | 2627 |
2627 } // namespace content | 2628 } // namespace content |
OLD | NEW |