diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-08 09:28:48 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-08 09:28:48 +0000 |
commit | 4176215f7cf7c88be763a488f68283da34fce463 (patch) | |
tree | 26261df92334a51fe01fdfaf04135ee913103bcd /chrome/browser/ui/panels/detached_panel_browsertest.cc | |
parent | e9577101dce15bbd4fd92b517c845230cdc57d5d (diff) | |
download | chromium_src-4176215f7cf7c88be763a488f68283da34fce463.zip chromium_src-4176215f7cf7c88be763a488f68283da34fce463.tar.gz chromium_src-4176215f7cf7c88be763a488f68283da34fce463.tar.bz2 |
Revert 125319 - Change panel drag related methods to use mouse location in screen coordinates.
This is in preparation for support inter-strip dragging.
BUG=none
TEST=existing tests due to no functionality change
Review URL: http://codereview.chromium.org/9616037
TBR=jianli@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9639007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/panels/detached_panel_browsertest.cc')
-rw-r--r-- | chrome/browser/ui/panels/detached_panel_browsertest.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/ui/panels/detached_panel_browsertest.cc b/chrome/browser/ui/panels/detached_panel_browsertest.cc index 885cc1d..24e22c1 100644 --- a/chrome/browser/ui/panels/detached_panel_browsertest.cc +++ b/chrome/browser/ui/panels/detached_panel_browsertest.cc @@ -55,12 +55,12 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, DragDetachedPanel) { panel_testing->PressLeftMouseButtonTitlebar(origin); EXPECT_EQ(origin, panel->GetBounds().origin()); - origin.Offset(-51, -102); - panel_testing->DragTitlebar(origin); + panel_testing->DragTitlebar(-51, 102); + origin.Offset(-51, 102); EXPECT_EQ(origin, panel->GetBounds().origin()); - origin.Offset(37, 45); - panel_testing->DragTitlebar(origin); + panel_testing->DragTitlebar(37, -42); + origin.Offset(37, -42); EXPECT_EQ(origin, panel->GetBounds().origin()); panel_testing->FinishDragTitlebar(); @@ -74,13 +74,12 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, DragDetachedPanel) { panel_testing->PressLeftMouseButtonTitlebar(origin); EXPECT_EQ(origin, panel->GetBounds().origin()); - origin.Offset(-51, -102); - panel_testing->DragTitlebar(origin); - + panel_testing->DragTitlebar(-51, 102); + origin.Offset(-51, 102); EXPECT_EQ(origin, panel->GetBounds().origin()); - origin.Offset(37, 45); - panel_testing->DragTitlebar(origin); + panel_testing->DragTitlebar(37, -42); + origin.Offset(37, -42); EXPECT_EQ(origin, panel->GetBounds().origin()); panel_testing->CancelDragTitlebar(); @@ -119,7 +118,7 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CloseDetachedPanelOnDrag) { // Start dragging a panel. panel1_testing->PressLeftMouseButtonTitlebar(panel1->GetBounds().origin()); - panel1_testing->DragTitlebar(panel1_new_position); + panel1_testing->DragTitlebar(-51, -102); EXPECT_TRUE(drag_controller->IsDragging()); EXPECT_EQ(panel1, drag_controller->dragging_panel()); @@ -167,7 +166,7 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CloseDetachedPanelOnDrag) { // Start dragging a panel. panel1_testing->PressLeftMouseButtonTitlebar(panel1->GetBounds().origin()); - panel1_testing->DragTitlebar(panel1_new_position); + panel1_testing->DragTitlebar(-51, -102); EXPECT_TRUE(drag_controller->IsDragging()); EXPECT_EQ(panel1, drag_controller->dragging_panel()); @@ -209,7 +208,7 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CloseDetachedPanelOnDrag) { // Start dragging a panel again. panel1_testing->PressLeftMouseButtonTitlebar(panel1->GetBounds().origin()); - panel1_testing->DragTitlebar(panel1_new_position); + panel1_testing->DragTitlebar(-51, -102); EXPECT_TRUE(drag_controller->IsDragging()); EXPECT_EQ(panel1, drag_controller->dragging_panel()); |