| 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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 int64_t component_id, | 1567 int64_t component_id, |
| 1568 WebInputEvent::Type expected_type) { | 1568 WebInputEvent::Type expected_type) { |
| 1569 EXPECT_EQ(process->sink().message_count(), 1U); | 1569 EXPECT_EQ(process->sink().message_count(), 1U); |
| 1570 | 1570 |
| 1571 const IPC::Message* message = process->sink().GetMessageAt(0); | 1571 const IPC::Message* message = process->sink().GetMessageAt(0); |
| 1572 EXPECT_EQ(InputMsg_HandleInputEvent::ID, message->type()); | 1572 EXPECT_EQ(InputMsg_HandleInputEvent::ID, message->type()); |
| 1573 InputMsg_HandleInputEvent::Param params; | 1573 InputMsg_HandleInputEvent::Param params; |
| 1574 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, ¶ms)); | 1574 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, ¶ms)); |
| 1575 | 1575 |
| 1576 const WebInputEvent* event = std::get<0>(params); | 1576 const WebInputEvent* event = std::get<0>(params); |
| 1577 ui::LatencyInfo latency_info = std::get<1>(params); | 1577 ui::LatencyInfo latency_info = std::get<2>(params); |
| 1578 | 1578 |
| 1579 EXPECT_TRUE(event->type() == expected_type); | 1579 EXPECT_TRUE(event->type() == expected_type); |
| 1580 EXPECT_TRUE(latency_info.FindLatency( | 1580 EXPECT_TRUE(latency_info.FindLatency( |
| 1581 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, component_id, NULL)); | 1581 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, component_id, NULL)); |
| 1582 | 1582 |
| 1583 process->sink().ClearMessages(); | 1583 process->sink().ClearMessages(); |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 // Tests that after input event passes through RWHI through ForwardXXXEvent() | 1586 // Tests that after input event passes through RWHI through ForwardXXXEvent() |
| 1587 // or ForwardXXXEventWithLatencyInfo(), LatencyInfo component | 1587 // or ForwardXXXEventWithLatencyInfo(), LatencyInfo component |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 ui::LatencyInfo()); | 1714 ui::LatencyInfo()); |
| 1715 | 1715 |
| 1716 | 1716 |
| 1717 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1717 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
| 1718 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1718 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
| 1719 | 1719 |
| 1720 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1720 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
| 1721 } | 1721 } |
| 1722 | 1722 |
| 1723 } // namespace content | 1723 } // namespace content |
| OLD | NEW |