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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 143153004: [Reland] Fix crash when accidentally touching the screen during a multi window resize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index a0ec85ebb5b2769ddabba0da3295f0369a5a5acf..26d070a0c40550b49eaaf21c3ab1d841adfaf420 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -565,6 +565,10 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, DragInSameWindow) {
EXPECT_EQ("1 0", IDString(model));
EXPECT_FALSE(TabDragController::IsActive());
EXPECT_FALSE(tab_strip->IsDragSessionActive());
+
+ // The tab strip should no longer have capture because the drag was ended and
+ // mouse/touch was released.
+ EXPECT_FALSE(tab_strip->GetWidget()->HasCapture());
}
namespace {
@@ -622,7 +626,7 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
ASSERT_TRUE(TabDragController::IsActive());
EXPECT_FALSE(GetIsDragged(browser()));
- // Release the mouse, stopping the drag session.
+ // Release mouse or touch, stopping the drag session.
ASSERT_TRUE(ReleaseInput());
ASSERT_FALSE(tab_strip2->IsDragSessionActive());
ASSERT_FALSE(tab_strip->IsDragSessionActive());
@@ -634,6 +638,11 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
// Both windows should not be maximized
EXPECT_FALSE(browser()->window()->IsMaximized());
EXPECT_FALSE(browser2->window()->IsMaximized());
+
+ // The tab strip should no longer have capture because the drag was ended and
+ // mouse/touch was released.
+ EXPECT_FALSE(tab_strip->GetWidget()->HasCapture());
+ EXPECT_FALSE(tab_strip2->GetWidget()->HasCapture());
}
namespace {
@@ -716,6 +725,11 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
// Both windows should not be maximized
EXPECT_FALSE(browser()->window()->IsMaximized());
EXPECT_FALSE(new_browser->window()->IsMaximized());
+
+ // The tab strip should no longer have capture because the drag was ended and
+ // mouse/touch was released.
+ EXPECT_FALSE(tab_strip->GetWidget()->HasCapture());
+ EXPECT_FALSE(tab_strip2->GetWidget()->HasCapture());
}
#if defined(OS_CHROMEOS)
@@ -989,6 +1003,10 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
// Remaining browser window should not be maximized
EXPECT_FALSE(browser()->window()->IsMaximized());
+
+ // The tab strip should no longer have capture because the drag was ended and
+ // mouse/touch was released.
+ EXPECT_FALSE(tab_strip->GetWidget()->HasCapture());
}
namespace {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698