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

Unified Diff: ash/wm/system_gesture_event_filter_unittest.cc

Issue 778043004: Set capture to the window being dragged when dragging a window on Ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_capture
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_gesture_event_filter_unittest.cc
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 58a89f815320daecd026608340f01f602038f80e..59f30a126080e3598ac7722ff304f2207f559d54 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -288,41 +288,6 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDrag) {
EXPECT_EQ(current_bounds.ToString(), right_tile_bounds.ToString());
}
-TEST_F(SystemGestureEventFilterTest, TwoFingerDragTwoWindows) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- ui::GestureConfiguration::GetInstance()
- ->set_max_separation_for_gesture_touches_in_pixels(0);
- views::Widget* first = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, gfx::Rect(10, 0, 50, 100));
- first->Show();
- views::Widget* second = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, gfx::Rect(100, 0, 100, 100));
- second->Show();
-
- // Start a two-finger drag on |first|, and then try to use another two-finger
- // drag to move |second|. The attempt to move |second| should fail.
- const gfx::Rect& first_bounds = first->GetWindowBoundsInScreen();
- const gfx::Rect& second_bounds = second->GetWindowBoundsInScreen();
- const int kSteps = 15;
- const int kTouchPoints = 4;
- gfx::Point points[kTouchPoints] = {
- first_bounds.origin() + gfx::Vector2d(5, 5),
- first_bounds.origin() + gfx::Vector2d(30, 10),
- second_bounds.origin() + gfx::Vector2d(5, 5),
- second_bounds.origin() + gfx::Vector2d(40, 20)
- };
-
- ui::test::EventGenerator generator(root_window);
- // Do not drag too fast to avoid fling.
- generator.GestureMultiFingerScroll(kTouchPoints, points,
- 50, kSteps, 0, 150);
-
- EXPECT_NE(first_bounds.ToString(),
- first->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(second_bounds.ToString(),
- second->GetWindowBoundsInScreen().ToString());
-}
-
TEST_F(SystemGestureEventFilterTest, WindowsWithMaxSizeDontSnap) {
gfx::Rect bounds(250, 150, 100, 100);
aura::Window* root_window = Shell::GetPrimaryRootWindow();
« no previous file with comments | « no previous file | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698