| 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 <memory> | 8 #include <memory> |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 std::string GetInputMessageTypes(MockRenderProcessHost* process) { | 67 std::string GetInputMessageTypes(MockRenderProcessHost* process) { |
| 68 std::string result; | 68 std::string result; |
| 69 for (size_t i = 0; i < process->sink().message_count(); ++i) { | 69 for (size_t i = 0; i < process->sink().message_count(); ++i) { |
| 70 const IPC::Message* message = process->sink().GetMessageAt(i); | 70 const IPC::Message* message = process->sink().GetMessageAt(i); |
| 71 EXPECT_EQ(InputMsg_HandleInputEvent::ID, message->type()); | 71 EXPECT_EQ(InputMsg_HandleInputEvent::ID, message->type()); |
| 72 InputMsg_HandleInputEvent::Param params; | 72 InputMsg_HandleInputEvent::Param params; |
| 73 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, ¶ms)); | 73 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, ¶ms)); |
| 74 const WebInputEvent* event = std::get<0>(params); | 74 const WebInputEvent* event = std::get<0>(params); |
| 75 if (i != 0) | 75 if (i != 0) |
| 76 result += " "; | 76 result += " "; |
| 77 result += WebInputEventTraits::GetName(event->type); | 77 result += WebInputEvent::GetName(event->type); |
| 78 } | 78 } |
| 79 process->sink().ClearMessages(); | 79 process->sink().ClearMessages(); |
| 80 return result; | 80 return result; |
| 81 } | 81 } |
| 82 | 82 |
| 83 // MockInputRouter ------------------------------------------------------------- | 83 // MockInputRouter ------------------------------------------------------------- |
| 84 | 84 |
| 85 class MockInputRouter : public InputRouter { | 85 class MockInputRouter : public InputRouter { |
| 86 public: | 86 public: |
| 87 explicit MockInputRouter(InputRouterClient* client) | 87 explicit MockInputRouter(InputRouterClient* client) |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 ui::LatencyInfo()); | 1703 ui::LatencyInfo()); |
| 1704 | 1704 |
| 1705 | 1705 |
| 1706 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1706 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
| 1707 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1707 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
| 1708 | 1708 |
| 1709 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1709 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 } // namespace content | 1712 } // namespace content |
| OLD | NEW |