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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 180983002: Avoids releasing capture prematurily when dragging tabs from one to another browser window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uses Aura mouse capture and release code path on Linux Created 6 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h"
6 6
7 #include "ash/wm/window_state.h" 7 #include "ash/wm/window_state.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // changes capture is released and the drag cancels. 318 // changes capture is released and the drag cancels.
319 frame->ReleaseCaptureOnNextClear(); 319 frame->ReleaseCaptureOnNextClear();
320 ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center)); 320 ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center));
321 EXPECT_FALSE(tab_strip->IsDragSessionActive()); 321 EXPECT_FALSE(tab_strip->IsDragSessionActive());
322 } 322 }
323 323
324 IN_PROC_BROWSER_TEST_F(TabDragControllerTest, GestureEndShouldEndDragTest) { 324 IN_PROC_BROWSER_TEST_F(TabDragControllerTest, GestureEndShouldEndDragTest) {
325 AddTabAndResetBrowser(browser()); 325 AddTabAndResetBrowser(browser());
326 326
327 TabStrip* tab_strip = GetTabStripForBrowser(browser()); 327 TabStrip* tab_strip = GetTabStripForBrowser(browser());
328 TabStripModel* model = browser()->tab_strip_model();
329 328
330 Tab* tab1 = tab_strip->tab_at(1); 329 Tab* tab1 = tab_strip->tab_at(1);
331 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2); 330 gfx::Point tab_1_center(tab1->width() / 2, tab1->height() / 2);
332 331
333 ui::GestureEvent gesture_begin(ui::ET_GESTURE_BEGIN, tab_1_center.x(), 332 ui::GestureEvent gesture_begin(ui::ET_GESTURE_BEGIN, tab_1_center.x(),
334 tab_1_center.x(), 0, base::TimeDelta(), 333 tab_1_center.x(), 0, base::TimeDelta(),
335 ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0.0f, 0.0f), 0); 334 ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0.0f, 0.0f), 0);
336 tab_strip->MaybeStartDrag(tab1, gesture_begin, 335 tab_strip->MaybeStartDrag(tab1, gesture_begin,
337 tab_strip->GetSelectionModel()); 336 tab_strip->GetSelectionModel());
338 //tab_strip->tab_at(1)->OnGestureEvent(&gesture_begin); 337 //tab_strip->tab_at(1)->OnGestureEvent(&gesture_begin);
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 DetachToDockedTabDragControllerTest, 2331 DetachToDockedTabDragControllerTest,
2333 ::testing::Values("mouse", "mouse docked")); 2332 ::testing::Values("mouse", "mouse docked"));
2334 INSTANTIATE_TEST_CASE_P(TabDragging, 2333 INSTANTIATE_TEST_CASE_P(TabDragging,
2335 DetachToBrowserTabDragControllerTestTouch, 2334 DetachToBrowserTabDragControllerTestTouch,
2336 ::testing::Values("touch", "touch docked")); 2335 ::testing::Values("touch", "touch docked"));
2337 #else 2336 #else
2338 INSTANTIATE_TEST_CASE_P(TabDragging, 2337 INSTANTIATE_TEST_CASE_P(TabDragging,
2339 DetachToBrowserTabDragControllerTest, 2338 DetachToBrowserTabDragControllerTest,
2340 ::testing::Values("mouse")); 2339 ::testing::Values("mouse"));
2341 #endif 2340 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698