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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits 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
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 217595874cd3dcc38dde24f77ec1d2d94f53f794..e0de9d3e66d50593cc09c13119039e2a700f3365 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -77,7 +77,7 @@ std::string GetInputMessageTypes(MockRenderProcessHost* process) {
const WebInputEvent* event = std::get<0>(params);
if (i != 0)
result += " ";
- result += WebInputEvent::GetName(event->type);
+ result += WebInputEvent::GetName(event->type());
}
process->sink().ClearMessages();
return result;
@@ -183,7 +183,7 @@ class MockRenderWidgetHost : public RenderWidgetHostImpl {
void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
InputEventAckState ack_result) override {
// Sniff touch acks.
- acked_touch_event_type_ = event.event.type;
+ acked_touch_event_type_ = event.event.type();
RenderWidgetHostImpl::OnTouchEventAck(event, ack_result);
}
@@ -297,7 +297,7 @@ class TestView : public TestRenderWidgetHostView {
}
void GestureEventAck(const WebGestureEvent& event,
InputEventAckState ack_result) override {
- gesture_event_type_ = event.type;
+ gesture_event_type_ = event.type();
ack_result_ = ack_result;
}
gfx::Size GetPhysicalBackingSize() const override {
@@ -396,14 +396,14 @@ class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
protected:
bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) override {
- prehandle_keyboard_event_type_ = event.type;
+ prehandle_keyboard_event_type_ = event.type();
prehandle_keyboard_event_called_ = true;
*is_keyboard_shortcut = prehandle_keyboard_event_is_shortcut_;
return prehandle_keyboard_event_;
}
void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override {
- unhandled_keyboard_event_type_ = event.type;
+ unhandled_keyboard_event_type_ = event.type();
unhandled_keyboard_event_called_ = true;
}
@@ -1576,7 +1576,7 @@ void CheckLatencyInfoComponentInMessage(RenderWidgetHostProcess* process,
const WebInputEvent* event = std::get<0>(params);
ui::LatencyInfo latency_info = std::get<1>(params);
- EXPECT_TRUE(event->type == expected_type);
+ EXPECT_TRUE(event->type() == expected_type);
EXPECT_TRUE(latency_info.FindLatency(
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, component_id, NULL));

Powered by Google App Engine
This is Rietveld 408576698