Chromium Code Reviews| 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 b59d82c632333787029ebce69a21c5252434a223..8f9792a2bc09d4c561f7d2301bbf09166f321cf6 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 |
| @@ -38,6 +38,7 @@ |
| #include "ash/shell.h" |
| #include "ash/test/cursor_manager_test_api.h" |
| #include "ash/wm/cursor_manager.h" |
| +#include "ash/wm/window_util.h" |
| #include "ui/aura/test/event_generator.h" |
| #include "ui/aura/root_window.h" |
| #endif |
| @@ -441,6 +442,13 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, |
| EXPECT_TRUE(GetTrackedByWorkspace(browser())); |
| EXPECT_TRUE(GetTrackedByWorkspace(new_browser)); |
| +#if defined(USE_ASH) |
| + // After this both windows should still be managable. |
| + ASSERT_TRUE(ash::wm::IsWindowPositionManaged( |
|
sky
2012/10/25 19:40:36
In general you only use ASSERT for things for that
Mr4D (OOO till 08-26)
2012/10/25 20:44:05
Done.
|
| + browser()->window()->GetNativeWindow())); |
| + ASSERT_TRUE(ash::wm::IsWindowPositionManaged( |
| + new_browser->window()->GetNativeWindow())); |
| +#endif |
| } |
| // Deletes a tab being dragged before the user moved enough to start a drag. |
| @@ -856,6 +864,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, |
| // Create another browser. |
| Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); |
| TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); |
| +#if defined(USE_ASH) |
|
sky
2012/10/25 19:40:36
Same comment here about the ifdef, remove it and a
Mr4D (OOO till 08-26)
2012/10/25 20:44:05
Done.
|
| + const gfx::Rect initial_bounds(browser2->window()->GetBounds()); |
| +#endif |
| // Move to the first tab and drag it enough so that it detaches, but not |
| // enough that it attaches to browser2. |
| @@ -879,6 +890,16 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, |
| EXPECT_EQ("100 0", IDString(browser2->tab_strip_model())); |
| EXPECT_TRUE(GetTrackedByWorkspace(browser2)); |
| +#if defined(USE_ASH) |
| + // Make sure that the window is still managed and not user moved. |
| + ASSERT_TRUE(ash::wm::IsWindowPositionManaged( |
| + browser2->window()->GetNativeWindow())); |
| + ASSERT_FALSE(ash::wm::HasUserChangedWindowPositionOrSize( |
| + browser2->window()->GetNativeWindow())); |
| + // Also make sure that the drag to window position has not changed. |
| + EXPECT_EQ(initial_bounds.ToString(), |
| + browser2->window()->GetBounds().ToString()); |
| +#endif |
| } |
| namespace { |