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

Unified Diff: content/renderer/input/input_event_filter_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/input/input_event_filter.cc ('k') | content/renderer/input/main_thread_event_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_event_filter_unittest.cc
diff --git a/content/renderer/input/input_event_filter_unittest.cc b/content/renderer/input/input_event_filter_unittest.cc
index 286e6bb5892e2cd359b2a946564866601a73a7f2..3a8b8ce88265537d280c95c0991b48731bd127c2 100644
--- a/content/renderer/input/input_event_filter_unittest.cc
+++ b/content/renderer/input/input_event_filter_unittest.cc
@@ -135,7 +135,8 @@ void AddEventsToFilter(IPC::MessageFilter* message_filter,
std::vector<IPC::Message> messages;
for (size_t i = 0; i < count; ++i) {
messages.push_back(InputMsg_HandleInputEvent(
- kTestRoutingID, &events[i], ui::LatencyInfo(),
+ kTestRoutingID, &events[i], std::vector<const WebInputEvent*>(),
+ ui::LatencyInfo(),
ui::WebInputEventTraits::ShouldBlockEventStream(events[i])
? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
: InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING));
@@ -271,7 +272,8 @@ TEST_F(InputEventFilterTest, PreserveRelativeOrder) {
std::vector<IPC::Message> messages;
messages.push_back(InputMsg_HandleInputEvent(
- kTestRoutingID, &mouse_down, ui::LatencyInfo(),
+ kTestRoutingID, &mouse_down, std::vector<const WebInputEvent*>(),
+ ui::LatencyInfo(),
ui::WebInputEventTraits::ShouldBlockEventStream(mouse_down)
? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
: InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING));
@@ -301,7 +303,8 @@ TEST_F(InputEventFilterTest, PreserveRelativeOrder) {
messages.push_back(InputMsg_MoveCaret(kTestRoutingID, gfx::Point()));
messages.push_back(InputMsg_HandleInputEvent(
- kTestRoutingID, &mouse_up, ui::LatencyInfo(),
+ kTestRoutingID, &mouse_up, std::vector<const WebInputEvent*>(),
+ ui::LatencyInfo(),
ui::WebInputEventTraits::ShouldBlockEventStream(mouse_up)
? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
: InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING));
@@ -342,7 +345,7 @@ TEST_F(InputEventFilterTest, NonBlockingWheel) {
InputMsg_HandleInputEvent::Param params;
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebInputEvent* event = std::get<0>(params);
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kEvents[i].size(), event->size());
kEvents[i].dispatchType =
@@ -361,7 +364,7 @@ TEST_F(InputEventFilterTest, NonBlockingWheel) {
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebMouseWheelEvent* event =
static_cast<const WebMouseWheelEvent*>(std::get<0>(params));
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
kEvents[2].dispatchType =
WebInputEvent::DispatchType::ListenersNonBlockingPassive;
@@ -403,7 +406,7 @@ TEST_F(InputEventFilterTest, NonBlockingTouch) {
InputMsg_HandleInputEvent::Param params;
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebInputEvent* event = std::get<0>(params);
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kEvents[i].size(), event->size());
kEvents[i].dispatchType =
@@ -422,7 +425,7 @@ TEST_F(InputEventFilterTest, NonBlockingTouch) {
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebTouchEvent* event =
static_cast<const WebTouchEvent*>(std::get<0>(params));
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kEvents[3].size(), event->size());
EXPECT_EQ(1u, kEvents[3].touchesLength);
@@ -460,7 +463,7 @@ TEST_F(InputEventFilterTest, IntermingledNonBlockingTouch) {
InputMsg_HandleInputEvent::Param params;
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebInputEvent* event = std::get<0>(params);
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kEvents[0].size(), event->size());
kEvents[0].dispatchType =
@@ -476,7 +479,7 @@ TEST_F(InputEventFilterTest, IntermingledNonBlockingTouch) {
InputMsg_HandleInputEvent::Param params;
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebInputEvent* event = std::get<0>(params);
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kEvents[1].size(), event->size());
kEvents[1].dispatchType =
@@ -492,7 +495,7 @@ TEST_F(InputEventFilterTest, IntermingledNonBlockingTouch) {
InputMsg_HandleInputEvent::Param params;
EXPECT_TRUE(InputMsg_HandleInputEvent::Read(&message, &params));
const WebInputEvent* event = std::get<0>(params);
- InputEventDispatchType dispatch_type = std::get<2>(params);
+ InputEventDispatchType dispatch_type = std::get<3>(params);
EXPECT_EQ(kBlockingEvents[0].size(), event->size());
EXPECT_TRUE(memcmp(&kBlockingEvents[0], event, event->size()) == 0);
« no previous file with comments | « content/renderer/input/input_event_filter.cc ('k') | content/renderer/input/main_thread_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698