| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4194 ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(65, 202), | 4194 ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(65, 202), |
| 4195 kTouchId1, tes.Now()); | 4195 kTouchId1, tes.Now()); |
| 4196 DispatchEventUsingWindowDispatcher(&move2); | 4196 DispatchEventUsingWindowDispatcher(&move2); |
| 4197 EXPECT_2_EVENTS(delegate->events(), | 4197 EXPECT_2_EVENTS(delegate->events(), |
| 4198 ui::ET_GESTURE_SCROLL_UPDATE, | 4198 ui::ET_GESTURE_SCROLL_UPDATE, |
| 4199 ui::ET_GESTURE_PINCH_UPDATE); | 4199 ui::ET_GESTURE_PINCH_UPDATE); |
| 4200 } | 4200 } |
| 4201 | 4201 |
| 4202 // Tests that delaying the ack of a touch release doesn't trigger a long press | 4202 // Tests that delaying the ack of a touch release doesn't trigger a long press |
| 4203 // gesture. | 4203 // gesture. |
| 4204 TEST_F(GestureRecognizerTest, EagerGestureDetection) { | 4204 TEST_F(GestureRecognizerTest, DISABLED_EagerGestureDetection) { |
| 4205 scoped_ptr<QueueTouchEventDelegate> delegate( | 4205 scoped_ptr<QueueTouchEventDelegate> delegate( |
| 4206 new QueueTouchEventDelegate(host()->dispatcher())); | 4206 new QueueTouchEventDelegate(host()->dispatcher())); |
| 4207 TimedEvents tes; | 4207 TimedEvents tes; |
| 4208 const int kTouchId = 2; | 4208 const int kTouchId = 2; |
| 4209 gfx::Rect bounds(100, 200, 100, 100); | 4209 gfx::Rect bounds(100, 200, 100, 100); |
| 4210 scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( | 4210 scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
| 4211 delegate.get(), -1234, bounds, root_window())); | 4211 delegate.get(), -1234, bounds, root_window())); |
| 4212 delegate->set_window(window.get()); | 4212 delegate->set_window(window.get()); |
| 4213 | 4213 |
| 4214 delegate->Reset(); | 4214 delegate->Reset(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4278 ui::TouchEvent move3( | 4278 ui::TouchEvent move3( |
| 4279 ui::ET_TOUCH_MOVED, gfx::Point(65, 202), kTouchId1, tes.Now()); | 4279 ui::ET_TOUCH_MOVED, gfx::Point(65, 202), kTouchId1, tes.Now()); |
| 4280 DispatchEventUsingWindowDispatcher(&move3); | 4280 DispatchEventUsingWindowDispatcher(&move3); |
| 4281 | 4281 |
| 4282 delegate->ReceivedAck(); | 4282 delegate->ReceivedAck(); |
| 4283 EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE); | 4283 EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE); |
| 4284 } | 4284 } |
| 4285 | 4285 |
| 4286 } // namespace test | 4286 } // namespace test |
| 4287 } // namespace aura | 4287 } // namespace aura |
| OLD | NEW |