| 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 244c71ded936e6b81a4a12a4ed02756251a5869a..2eb6f3fb1b992ac0a26ba5da19da3086958c97ba 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
|
| @@ -2450,93 +2450,6 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTestTouch,
|
| ASSERT_TRUE(ReleaseInput2());
|
| }
|
|
|
| -namespace {
|
| -
|
| -void DetachToDockedWindowNextStep(
|
| - DetachToBrowserTabDragControllerTest* test,
|
| - const gfx::Point& target_point,
|
| - int iteration) {
|
| - ASSERT_EQ(2u, test->browser_list->size());
|
| - Browser* new_browser = test->browser_list->get(1);
|
| - ASSERT_TRUE(new_browser->window()->IsActive());
|
| -
|
| - if (!iteration) {
|
| - ASSERT_TRUE(test->ReleaseInput());
|
| - return;
|
| - }
|
| - ASSERT_TRUE(test->DragInputToNotifyWhenDone(
|
| - target_point.x(), target_point.y(),
|
| - base::Bind(&DetachToDockedWindowNextStep,
|
| - test,
|
| - gfx::Point(target_point.x(), 1 + target_point.y()),
|
| - iteration - 1)));
|
| -}
|
| -
|
| -} // namespace
|
| -
|
| -// Drags from browser to separate window, docks that window and releases mouse.
|
| -IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
|
| - DetachToDockedWindowFromMaximizedWindow) {
|
| - // Enable docked windows for this test.
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - ash::switches::kAshEnableDockedWindows);
|
| -
|
| - // Maximize the initial browser window.
|
| - browser()->window()->Maximize();
|
| - ASSERT_TRUE(browser()->window()->IsMaximized());
|
| -
|
| - // Add another tab.
|
| - AddTabAndResetBrowser(browser());
|
| - TabStrip* tab_strip = GetTabStripForBrowser(browser());
|
| -
|
| - // Move to the first tab and drag it enough so that it detaches.
|
| - gfx::Point tab_0_center(
|
| - GetCenterInScreenCoordinates(tab_strip->tab_at(0)));
|
| - ASSERT_TRUE(PressInput(tab_0_center));
|
| -
|
| - // The following matches kMovesBeforeAdjust in snap_sizer.cc
|
| - const int kNumIterations = 25 * 5 + 10;
|
| - ASSERT_TRUE(DragInputToNotifyWhenDone(
|
| - tab_0_center.x(), tab_0_center.y() + GetDetachY(tab_strip),
|
| - base::Bind(&DetachToDockedWindowNextStep, this,
|
| - gfx::Point(0, tab_0_center.y() + GetDetachY(tab_strip)),
|
| - kNumIterations)));
|
| - // Continue dragging enough times to go through snapping sequence and dock
|
| - // the window.
|
| - QuitWhenNotDragging();
|
| - // Should no longer be dragging.
|
| - ASSERT_FALSE(tab_strip->IsDragSessionActive());
|
| - ASSERT_FALSE(TabDragController::IsActive());
|
| -
|
| - // There should now be another browser.
|
| - ASSERT_EQ(2u, browser_list->size());
|
| - Browser* new_browser = browser_list->get(1);
|
| - ASSERT_TRUE(new_browser->window()->IsActive());
|
| - TabStrip* tab_strip2 = GetTabStripForBrowser(new_browser);
|
| - ASSERT_FALSE(tab_strip2->IsDragSessionActive());
|
| -
|
| - EXPECT_EQ("0", IDString(new_browser->tab_strip_model()));
|
| - EXPECT_EQ("1", IDString(browser()->tab_strip_model()));
|
| -
|
| - // The bounds of the initial window should not have changed.
|
| - EXPECT_TRUE(browser()->window()->IsMaximized());
|
| -
|
| - EXPECT_FALSE(GetIsDragged(browser()));
|
| - EXPECT_FALSE(GetIsDragged(new_browser));
|
| - // After this both windows should still be manageable.
|
| - EXPECT_TRUE(IsWindowPositionManaged(browser()->window()->GetNativeWindow()));
|
| - EXPECT_TRUE(IsWindowPositionManaged(
|
| - new_browser->window()->GetNativeWindow()));
|
| -
|
| - ash::wm::WindowState* window_state =
|
| - ash::wm::GetWindowState(new_browser->window()->GetNativeWindow());
|
| - // The new window should not be maximized because it gets docked or snapped.
|
| - EXPECT_FALSE(new_browser->window()->IsMaximized());
|
| - // The new window should be docked and not snapped.
|
| - EXPECT_TRUE(window_state->IsDocked());
|
| - EXPECT_FALSE(window_state->IsSnapped());
|
| -}
|
| -
|
| #endif // OS_CHROMEOS
|
|
|
| #if defined(USE_ASH)
|
|
|