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

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

Issue 304793003: use enum to specify deviceSource for fling animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased for parallel breaking changes Created 6 years, 7 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 f1de19a9c69523169456063c977b0eae119bc866..c54a1fbf9b236a9b26fc7ff662d5c321dfed4f58 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -39,6 +39,7 @@
#endif
using base::TimeDelta;
+using blink::WebGestureDevice;
using blink::WebGestureEvent;
using blink::WebInputEvent;
using blink::WebKeyboardEvent;
@@ -551,15 +552,14 @@ class RenderWidgetHostTest : public testing::Test {
// Inject simple synthetic WebGestureEvent instances.
void SimulateGestureEvent(WebInputEvent::Type type,
- WebGestureEvent::SourceDevice sourceDevice) {
+ WebGestureDevice sourceDevice) {
host_->ForwardGestureEvent(
SyntheticWebGestureEventBuilder::Build(type, sourceDevice));
}
- void SimulateGestureEventWithLatencyInfo(
- WebInputEvent::Type type,
- WebGestureEvent::SourceDevice sourceDevice,
- const ui::LatencyInfo& ui_latency) {
+ void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type,
+ WebGestureDevice sourceDevice,
+ const ui::LatencyInfo& ui_latency) {
host_->ForwardGestureEventWithLatencyInfo(
SyntheticWebGestureEventBuilder::Build(type, sourceDevice),
ui_latency);
@@ -624,8 +624,7 @@ class RenderWidgetHostTest : public testing::Test {
// This is for tests that are to be run for all source devices.
class RenderWidgetHostWithSourceTest
: public RenderWidgetHostTest,
- public testing::WithParamInterface<WebGestureEvent::SourceDevice> {
-};
+ public testing::WithParamInterface<WebGestureDevice> {};
#endif // GTEST_HAS_PARAM_TEST
} // namespace
@@ -923,7 +922,7 @@ TEST_F(RenderWidgetHostTest, HandleWheelEvent) {
TEST_F(RenderWidgetHostTest, UnhandledGestureEvent) {
SimulateGestureEvent(WebInputEvent::GestureTwoFingerTap,
- WebGestureEvent::Touchscreen);
+ blink::WebGestureDeviceTouchscreen);
// Make sure we sent the input event to the renderer.
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(
@@ -1245,7 +1244,7 @@ TEST_F(RenderWidgetHostTest, IgnoreInputEvent) {
EXPECT_FALSE(host_->mock_input_router()->sent_wheel_event_);
SimulateGestureEvent(WebInputEvent::GestureScrollBegin,
- WebGestureEvent::Touchscreen);
+ blink::WebGestureDeviceTouchpad);
EXPECT_FALSE(host_->mock_input_router()->sent_gesture_event_);
PressTouchPoint(100, 100);
@@ -1396,13 +1395,13 @@ TEST_F(RenderWidgetHostTest, InputEventRWHLatencyComponent) {
// Tests RWHI::ForwardGestureEvent().
SimulateGestureEvent(WebInputEvent::GestureScrollBegin,
- WebGestureEvent::Touchscreen);
+ blink::WebGestureDeviceTouchscreen);
CheckLatencyInfoComponentInMessage(
process_, GetLatencyComponentId(), WebInputEvent::GestureScrollBegin);
// Tests RWHI::ForwardGestureEventWithLatencyInfo().
SimulateGestureEventWithLatencyInfo(WebInputEvent::GestureScrollUpdate,
- WebGestureEvent::Touchscreen,
+ blink::WebGestureDeviceTouchscreen,
ui::LatencyInfo());
CheckLatencyInfoComponentInMessage(
process_, GetLatencyComponentId(), WebInputEvent::GestureScrollUpdate);

Powered by Google App Engine
This is Rietveld 408576698