OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "content/common/input/synthetic_web_input_event_builders.h" | 9 #include "content/common/input/synthetic_web_input_event_builders.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
11 #include "content/public/test/mock_render_thread.h" | 11 #include "content/public/test/mock_render_thread.h" |
12 #include "content/test/mock_render_process.h" | 12 #include "content/test/mock_render_process.h" |
13 #include "ipc/ipc_test_sink.h" | 13 #include "ipc/ipc_test_sink.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/WebKit/public/web/WebInputEvent.h" | 15 #include "third_party/WebKit/public/web/WebInputEvent.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class RenderWidgetUnittest : public testing::Test { | 20 class RenderWidgetUnittest : public testing::Test { |
21 public: | 21 public: |
22 RenderWidgetUnittest() {} | 22 RenderWidgetUnittest() {} |
23 ~RenderWidgetUnittest() override {} | 23 ~RenderWidgetUnittest() override {} |
24 | 24 |
25 private: | 25 private: |
26 MockRenderProcess render_process_; | 26 MockRenderProcess render_process_; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ASSERT_EQ(1u, widget->sink()->message_count()); | 137 ASSERT_EQ(1u, widget->sink()->message_count()); |
138 message = widget->sink()->GetMessageAt(0); | 138 message = widget->sink()->GetMessageAt(0); |
139 EXPECT_EQ(InputHostMsg_HandleInputEvent_ACK::ID, message->type()); | 139 EXPECT_EQ(InputHostMsg_HandleInputEvent_ACK::ID, message->type()); |
140 InputHostMsg_HandleInputEvent_ACK::Read(message, ¶ms); | 140 InputHostMsg_HandleInputEvent_ACK::Read(message, ¶ms); |
141 ack_state = get<0>(params).state; | 141 ack_state = get<0>(params).state; |
142 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, ack_state); | 142 EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, ack_state); |
143 widget->sink()->ClearMessages(); | 143 widget->sink()->ClearMessages(); |
144 } | 144 } |
145 | 145 |
146 } // namespace content | 146 } // namespace content |
OLD | NEW |