Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, &params)); 1574 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, &params));
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698