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

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

Issue 2250233002: Type->String helper function added to WebInputEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blink_Common_export instead of blink_export Created 4 years, 4 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, &params)); 73 EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, &params));
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 += ui::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 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 ui::LatencyInfo()); 1700 ui::LatencyInfo());
1701 1701
1702 1702
1703 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). 1703 // Tests RWHI::ForwardWheelEventWithLatencyInfo().
1704 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); 1704 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo());
1705 1705
1706 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); 1706 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1707 } 1707 }
1708 1708
1709 } // namespace content 1709 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698