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

Side by Side Diff: content/browser/renderer_host/input/gesture_event_queue_unittest.cc

Issue 291003002: Move OverscrollController to RenderWidgetHostViewAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK_GE Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 WebInputEvent::GestureScrollUpdate, 1144 WebInputEvent::GestureScrollUpdate,
1145 WebInputEvent::GestureScrollUpdate}; 1145 WebInputEvent::GestureScrollUpdate};
1146 1146
1147 for (unsigned i = 0; i < sizeof(expected) / sizeof(WebInputEvent::Type); 1147 for (unsigned i = 0; i < sizeof(expected) / sizeof(WebInputEvent::Type);
1148 i++) { 1148 i++) {
1149 WebGestureEvent merged_event = GestureEventQueueEventAt(i); 1149 WebGestureEvent merged_event = GestureEventQueueEventAt(i);
1150 EXPECT_EQ(expected[i], merged_event.type); 1150 EXPECT_EQ(expected[i], merged_event.type);
1151 } 1151 }
1152 } 1152 }
1153 1153
1154 TEST_F(GestureEventQueueTest, DropZeroVelocityFlings) {
1155 WebGestureEvent gesture_event;
1156 gesture_event.type = WebInputEvent::GestureFlingStart;
1157 gesture_event.sourceDevice = WebGestureEvent::Touchpad;
1158 gesture_event.data.flingStart.velocityX = 0.f;
1159 gesture_event.data.flingStart.velocityY = 0.f;
1160 ASSERT_EQ(0U, GetAndResetSentGestureEventCount());
1161 ASSERT_EQ(0U, GestureEventQueueSize());
1162 EXPECT_FALSE(SimulateGestureEvent(gesture_event));
1163 EXPECT_EQ(0U, GetAndResetSentGestureEventCount());
1164 EXPECT_EQ(0U, GestureEventQueueSize());
1165 }
1166
1167 } // namespace content 1154 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/gesture_event_queue.cc ('k') | content/browser/renderer_host/input/input_router_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698