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

Side by Side Diff: ui/aura/gestures/gesture_recognizer_unittest.cc

Issue 536843003: Disable eager gesture detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable test depending on eager behavior. Created 6 years, 3 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 (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
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
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
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698