| 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 "ash/root_window_controller.h" | 5 #include "ash/root_window_controller.h" | 
| 6 #include "ash/shell.h" | 6 #include "ash/shell.h" | 
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" | 
| 8 #include "ash/wm/overview/window_selector_controller.h" | 8 #include "ash/wm/overview/window_selector_controller.h" | 
| 9 #include "ui/aura/test/test_window_delegate.h" | 9 #include "ui/aura/test/test_window_delegate.h" | 
| 10 #include "ui/aura/test/test_windows.h" | 10 #include "ui/aura/test/test_windows.h" | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 82 // Tests a swipe up with three fingers without releasing followed by a swipe | 82 // Tests a swipe up with three fingers without releasing followed by a swipe | 
| 83 // down by a lesser amount which should still be enough to exit. | 83 // down by a lesser amount which should still be enough to exit. | 
| 84 TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) { | 84 TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) { | 
| 85   gfx::Rect bounds(0, 0, 400, 400); | 85   gfx::Rect bounds(0, 0, 400, 400); | 
| 86   aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 86   aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 
| 87   scoped_ptr<aura::Window> window1(CreateWindow(bounds)); | 87   scoped_ptr<aura::Window> window1(CreateWindow(bounds)); | 
| 88   scoped_ptr<aura::Window> window2(CreateWindow(bounds)); | 88   scoped_ptr<aura::Window> window2(CreateWindow(bounds)); | 
| 89   ui::test::EventGenerator generator(root_window, root_window); | 89   ui::test::EventGenerator generator(root_window, root_window); | 
| 90   base::TimeDelta timestamp = base::TimeDelta::FromInternalValue( | 90   base::TimeDelta timestamp = base::TimeDelta::FromInternalValue( | 
| 91       base::TimeTicks::Now().ToInternalValue()); | 91       base::TimeTicks::Now().ToInternalValue()); | 
| 92   gfx::Point start; | 92   gfx::PointF start; | 
| 93   int num_fingers = 3; | 93   int num_fingers = 3; | 
| 94   base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5)); | 94   base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5)); | 
| 95   ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL, | 95   ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL, | 
| 96                                start, | 96                                start, | 
| 97                                timestamp, | 97                                timestamp, | 
| 98                                0, | 98                                0, | 
| 99                                0, 0, | 99                                0, 0, | 
| 100                                0, 0, | 100                                0, 0, | 
| 101                                num_fingers); | 101                                num_fingers); | 
| 102   generator.Dispatch(&fling_cancel); | 102   generator.Dispatch(&fling_cancel); | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134                               start, | 134                               start, | 
| 135                               timestamp, | 135                               timestamp, | 
| 136                               0, | 136                               0, | 
| 137                               0, 10, | 137                               0, 10, | 
| 138                               0, 10, | 138                               0, 10, | 
| 139                               num_fingers); | 139                               num_fingers); | 
| 140   generator.Dispatch(&fling_start); | 140   generator.Dispatch(&fling_start); | 
| 141 } | 141 } | 
| 142 | 142 | 
| 143 }  // namespace ash | 143 }  // namespace ash | 
| OLD | NEW | 
|---|