| OLD | NEW |
| 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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 ASSERT_EQ(2u, native_browser_list->size()); | 1385 ASSERT_EQ(2u, native_browser_list->size()); |
| 1386 Browser* new_browser = native_browser_list->get(1); | 1386 Browser* new_browser = native_browser_list->get(1); |
| 1387 ASSERT_TRUE(new_browser->window()->IsActive()); | 1387 ASSERT_TRUE(new_browser->window()->IsActive()); |
| 1388 TabStrip* tab_strip2 = GetTabStripForBrowser(new_browser); | 1388 TabStrip* tab_strip2 = GetTabStripForBrowser(new_browser); |
| 1389 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); | 1389 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); |
| 1390 | 1390 |
| 1391 // This other browser should be on the second screen (with mouse drag) | 1391 // This other browser should be on the second screen (with mouse drag) |
| 1392 // With the touch input the browser cannot be dragged from one screen | 1392 // With the touch input the browser cannot be dragged from one screen |
| 1393 // to another and the window stays on the first screen. | 1393 // to another and the window stays on the first screen. |
| 1394 if (input_source() == INPUT_SOURCE_MOUSE) { | 1394 if (input_source() == INPUT_SOURCE_MOUSE) { |
| 1395 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1395 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1396 ASSERT_EQ(2u, roots.size()); | 1396 ASSERT_EQ(2u, roots.size()); |
| 1397 aura::RootWindow* second_root = roots[1]; | 1397 aura::Window* second_root = roots[1]; |
| 1398 EXPECT_EQ(second_root, | 1398 EXPECT_EQ(second_root, |
| 1399 new_browser->window()->GetNativeWindow()->GetRootWindow()); | 1399 new_browser->window()->GetNativeWindow()->GetRootWindow()); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); | 1402 EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); |
| 1403 EXPECT_EQ("1", IDString(browser()->tab_strip_model())); | 1403 EXPECT_EQ("1", IDString(browser()->tab_strip_model())); |
| 1404 | 1404 |
| 1405 // Both windows should not be maximized | 1405 // Both windows should not be maximized |
| 1406 EXPECT_FALSE(browser()->window()->IsMaximized()); | 1406 EXPECT_FALSE(browser()->window()->IsMaximized()); |
| 1407 EXPECT_FALSE(new_browser->window()->IsMaximized()); | 1407 EXPECT_FALSE(new_browser->window()->IsMaximized()); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1437 // Add another tab. | 1437 // Add another tab. |
| 1438 AddTabAndResetBrowser(browser()); | 1438 AddTabAndResetBrowser(browser()); |
| 1439 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1439 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1440 | 1440 |
| 1441 // Create another browser. | 1441 // Create another browser. |
| 1442 Browser* browser2 = CreateBrowser(browser()->profile()); | 1442 Browser* browser2 = CreateBrowser(browser()->profile()); |
| 1443 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); | 1443 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); |
| 1444 ResetIDs(browser2->tab_strip_model(), 100); | 1444 ResetIDs(browser2->tab_strip_model(), 100); |
| 1445 | 1445 |
| 1446 // Move the second browser to the second display. | 1446 // Move the second browser to the second display. |
| 1447 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1447 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1448 ASSERT_EQ(2u, roots.size()); | 1448 ASSERT_EQ(2u, roots.size()); |
| 1449 aura::RootWindow* second_root = roots[1]; | 1449 aura::Window* second_root = roots[1]; |
| 1450 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( | 1450 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 1451 second_root).work_area(); | 1451 second_root).work_area(); |
| 1452 browser2->window()->SetBounds(work_area); | 1452 browser2->window()->SetBounds(work_area); |
| 1453 EXPECT_EQ(second_root, | 1453 EXPECT_EQ(second_root, |
| 1454 browser2->window()->GetNativeWindow()->GetRootWindow()); | 1454 browser2->window()->GetNativeWindow()->GetRootWindow()); |
| 1455 | 1455 |
| 1456 // Move to the first tab and drag it enough so that it detaches, but not | 1456 // Move to the first tab and drag it enough so that it detaches, but not |
| 1457 // enough that it attaches to browser2. | 1457 // enough that it attaches to browser2. |
| 1458 gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); | 1458 gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); |
| 1459 ASSERT_TRUE(PressInput(tab_0_center)); | 1459 ASSERT_TRUE(PressInput(tab_0_center)); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1487 // Add another tab. | 1487 // Add another tab. |
| 1488 AddTabAndResetBrowser(browser()); | 1488 AddTabAndResetBrowser(browser()); |
| 1489 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1489 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1490 | 1490 |
| 1491 // Create another browser. | 1491 // Create another browser. |
| 1492 Browser* browser2 = CreateBrowser(browser()->profile()); | 1492 Browser* browser2 = CreateBrowser(browser()->profile()); |
| 1493 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); | 1493 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); |
| 1494 ResetIDs(browser2->tab_strip_model(), 100); | 1494 ResetIDs(browser2->tab_strip_model(), 100); |
| 1495 | 1495 |
| 1496 // Move both browsers to the second display. | 1496 // Move both browsers to the second display. |
| 1497 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1497 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1498 ASSERT_EQ(2u, roots.size()); | 1498 ASSERT_EQ(2u, roots.size()); |
| 1499 aura::RootWindow* second_root = roots[1]; | 1499 aura::Window* second_root = roots[1]; |
| 1500 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( | 1500 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 1501 second_root).work_area(); | 1501 second_root).work_area(); |
| 1502 browser()->window()->SetBounds(work_area); | 1502 browser()->window()->SetBounds(work_area); |
| 1503 | 1503 |
| 1504 // position both browser windows side by side on the second screen. | 1504 // position both browser windows side by side on the second screen. |
| 1505 gfx::Rect work_area2(work_area); | 1505 gfx::Rect work_area2(work_area); |
| 1506 work_area.set_width(work_area.width()/2); | 1506 work_area.set_width(work_area.width()/2); |
| 1507 browser()->window()->SetBounds(work_area); | 1507 browser()->window()->SetBounds(work_area); |
| 1508 work_area2.set_x(work_area2.x() + work_area2.width()/2); | 1508 work_area2.set_x(work_area2.x() + work_area2.width()/2); |
| 1509 work_area2.set_width(work_area2.width()/2); | 1509 work_area2.set_width(work_area2.width()/2); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 // Drags from a maximized browser to another non-maximized browser on a second | 1546 // Drags from a maximized browser to another non-maximized browser on a second |
| 1547 // display and releases input. | 1547 // display and releases input. |
| 1548 IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, | 1548 IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, |
| 1549 DragMaxTabToNonMaxWindowInSeparateDisplay) { | 1549 DragMaxTabToNonMaxWindowInSeparateDisplay) { |
| 1550 // Add another tab. | 1550 // Add another tab. |
| 1551 AddTabAndResetBrowser(browser()); | 1551 AddTabAndResetBrowser(browser()); |
| 1552 browser()->window()->Maximize(); | 1552 browser()->window()->Maximize(); |
| 1553 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1553 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1554 | 1554 |
| 1555 // Create another browser on the second display. | 1555 // Create another browser on the second display. |
| 1556 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1556 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1557 ASSERT_EQ(2u, roots.size()); | 1557 ASSERT_EQ(2u, roots.size()); |
| 1558 aura::RootWindow* first_root = roots[0]; | 1558 aura::Window* first_root = roots[0]; |
| 1559 aura::RootWindow* second_root = roots[1]; | 1559 aura::Window* second_root = roots[1]; |
| 1560 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( | 1560 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 1561 second_root).work_area(); | 1561 second_root).work_area(); |
| 1562 work_area.Inset(20,20,20,60); | 1562 work_area.Inset(20,20,20,60); |
| 1563 Browser::CreateParams params(browser()->profile(), | 1563 Browser::CreateParams params(browser()->profile(), |
| 1564 browser()->host_desktop_type()); | 1564 browser()->host_desktop_type()); |
| 1565 params.initial_show_state = ui::SHOW_STATE_NORMAL; | 1565 params.initial_show_state = ui::SHOW_STATE_NORMAL; |
| 1566 params.initial_bounds = work_area; | 1566 params.initial_bounds = work_area; |
| 1567 Browser* browser2 = new Browser(params); | 1567 Browser* browser2 = new Browser(params); |
| 1568 AddBlankTabAndShow(browser2); | 1568 AddBlankTabAndShow(browser2); |
| 1569 | 1569 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 // Add another tab. | 1619 // Add another tab. |
| 1620 AddTabAndResetBrowser(browser()); | 1620 AddTabAndResetBrowser(browser()); |
| 1621 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1621 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1622 | 1622 |
| 1623 // Create another browser. | 1623 // Create another browser. |
| 1624 Browser* browser2 = CreateBrowser(browser()->profile()); | 1624 Browser* browser2 = CreateBrowser(browser()->profile()); |
| 1625 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); | 1625 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); |
| 1626 ResetIDs(browser2->tab_strip_model(), 100); | 1626 ResetIDs(browser2->tab_strip_model(), 100); |
| 1627 | 1627 |
| 1628 // Move the second browser to the second display. | 1628 // Move the second browser to the second display. |
| 1629 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1629 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1630 ASSERT_EQ(2u, roots.size()); | 1630 ASSERT_EQ(2u, roots.size()); |
| 1631 aura::RootWindow* second_root = roots[1]; | 1631 aura::Window* second_root = roots[1]; |
| 1632 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( | 1632 gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 1633 second_root).work_area(); | 1633 second_root).work_area(); |
| 1634 browser2->window()->SetBounds(work_area); | 1634 browser2->window()->SetBounds(work_area); |
| 1635 EXPECT_EQ(second_root, | 1635 EXPECT_EQ(second_root, |
| 1636 browser2->window()->GetNativeWindow()->GetRootWindow()); | 1636 browser2->window()->GetNativeWindow()->GetRootWindow()); |
| 1637 | 1637 |
| 1638 // Put the second browser into immersive fullscreen. | 1638 // Put the second browser into immersive fullscreen. |
| 1639 BrowserView* browser_view2 = BrowserView::GetBrowserViewForBrowser(browser2); | 1639 BrowserView* browser_view2 = BrowserView::GetBrowserViewForBrowser(browser2); |
| 1640 ImmersiveModeController* immersive_controller2 = | 1640 ImmersiveModeController* immersive_controller2 = |
| 1641 browser_view2->immersive_mode_controller(); | 1641 browser_view2->immersive_mode_controller(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 | 1765 |
| 1766 // Verifies cursor's device scale factor is updated when a tab is moved across | 1766 // Verifies cursor's device scale factor is updated when a tab is moved across |
| 1767 // displays with different device scale factors (http://crbug.com/154183). | 1767 // displays with different device scale factors (http://crbug.com/154183). |
| 1768 IN_PROC_BROWSER_TEST_P(DifferentDeviceScaleFactorDisplayTabDragControllerTest, | 1768 IN_PROC_BROWSER_TEST_P(DifferentDeviceScaleFactorDisplayTabDragControllerTest, |
| 1769 CursorDeviceScaleFactor) { | 1769 CursorDeviceScaleFactor) { |
| 1770 // Add another tab. | 1770 // Add another tab. |
| 1771 AddTabAndResetBrowser(browser()); | 1771 AddTabAndResetBrowser(browser()); |
| 1772 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1772 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1773 | 1773 |
| 1774 // Move the second browser to the second display. | 1774 // Move the second browser to the second display. |
| 1775 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1775 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1776 ASSERT_EQ(2u, roots.size()); | 1776 ASSERT_EQ(2u, roots.size()); |
| 1777 | 1777 |
| 1778 // Move to the first tab and drag it enough so that it detaches. | 1778 // Move to the first tab and drag it enough so that it detaches. |
| 1779 gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); | 1779 gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); |
| 1780 ASSERT_TRUE(PressInput(tab_0_center)); | 1780 ASSERT_TRUE(PressInput(tab_0_center)); |
| 1781 ASSERT_TRUE(DragInputToNotifyWhenDone( | 1781 ASSERT_TRUE(DragInputToNotifyWhenDone( |
| 1782 tab_0_center.x(), tab_0_center.y() + GetDetachY(tab_strip), | 1782 tab_0_center.x(), tab_0_center.y() + GetDetachY(tab_strip), |
| 1783 base::Bind(&CursorDeviceScaleFactorStep, | 1783 base::Bind(&CursorDeviceScaleFactorStep, |
| 1784 this, tab_strip, 0))); | 1784 this, tab_strip, 0))); |
| 1785 QuitWhenNotDragging(); | 1785 QuitWhenNotDragging(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 // Switching display mode should cancel the drag operation. | 1831 // Switching display mode should cancel the drag operation. |
| 1832 ash::internal::DisplayManager* display_manager = | 1832 ash::internal::DisplayManager* display_manager = |
| 1833 ash::Shell::GetInstance()->display_manager(); | 1833 ash::Shell::GetInstance()->display_manager(); |
| 1834 display_manager->AddRemoveDisplay(); | 1834 display_manager->AddRemoveDisplay(); |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 // Invoked from the nested message loop. | 1837 // Invoked from the nested message loop. |
| 1838 void CancelDragTabToWindowInSeparateDisplayStep2( | 1838 void CancelDragTabToWindowInSeparateDisplayStep2( |
| 1839 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, | 1839 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, |
| 1840 TabStrip* tab_strip, | 1840 TabStrip* tab_strip, |
| 1841 aura::RootWindow* current_root, | 1841 aura::Window* current_root, |
| 1842 gfx::Point final_destination, | 1842 gfx::Point final_destination, |
| 1843 const BrowserList* browser_list) { | 1843 const BrowserList* browser_list) { |
| 1844 ASSERT_FALSE(tab_strip->IsDragSessionActive()); | 1844 ASSERT_FALSE(tab_strip->IsDragSessionActive()); |
| 1845 ASSERT_TRUE(TabDragController::IsActive()); | 1845 ASSERT_TRUE(TabDragController::IsActive()); |
| 1846 ASSERT_EQ(2u, browser_list->size()); | 1846 ASSERT_EQ(2u, browser_list->size()); |
| 1847 | 1847 |
| 1848 Browser* new_browser = browser_list->get(1); | 1848 Browser* new_browser = browser_list->get(1); |
| 1849 EXPECT_EQ(current_root, | 1849 EXPECT_EQ(current_root, |
| 1850 new_browser->window()->GetNativeWindow()->GetRootWindow()); | 1850 new_browser->window()->GetNativeWindow()->GetRootWindow()); |
| 1851 | 1851 |
| 1852 ASSERT_TRUE(test->DragTabAndExecuteTaskWhenDone( | 1852 ASSERT_TRUE(test->DragTabAndExecuteTaskWhenDone( |
| 1853 final_destination, | 1853 final_destination, |
| 1854 base::Bind(&CancelDragTabToWindowInSeparateDisplayStep3, | 1854 base::Bind(&CancelDragTabToWindowInSeparateDisplayStep3, |
| 1855 tab_strip, browser_list))); | 1855 tab_strip, browser_list))); |
| 1856 } | 1856 } |
| 1857 | 1857 |
| 1858 } // namespace | 1858 } // namespace |
| 1859 | 1859 |
| 1860 // Drags from browser to a second display and releases input. | 1860 // Drags from browser to a second display and releases input. |
| 1861 IN_PROC_BROWSER_TEST_F( | 1861 IN_PROC_BROWSER_TEST_F( |
| 1862 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest, | 1862 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest, |
| 1863 CancelDragTabToWindowIn2ndDisplay) { | 1863 CancelDragTabToWindowIn2ndDisplay) { |
| 1864 // Add another tab. | 1864 // Add another tab. |
| 1865 AddTabAndResetBrowser(browser()); | 1865 AddTabAndResetBrowser(browser()); |
| 1866 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1866 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1867 | 1867 |
| 1868 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); | 1868 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); |
| 1869 | 1869 |
| 1870 // Move the second browser to the second display. | 1870 // Move the second browser to the second display. |
| 1871 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1871 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1872 ASSERT_EQ(2u, roots.size()); | 1872 ASSERT_EQ(2u, roots.size()); |
| 1873 gfx::Point final_destination = | 1873 gfx::Point final_destination = |
| 1874 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( | 1874 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 1875 roots[1]).work_area().CenterPoint(); | 1875 roots[1]).work_area().CenterPoint(); |
| 1876 | 1876 |
| 1877 // Move to the first tab and drag it enough so that it detaches, but not | 1877 // Move to the first tab and drag it enough so that it detaches, but not |
| 1878 // enough to move to another display. | 1878 // enough to move to another display. |
| 1879 gfx::Point tab_0_dst(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); | 1879 gfx::Point tab_0_dst(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); |
| 1880 ASSERT_TRUE(Press(tab_0_dst)); | 1880 ASSERT_TRUE(Press(tab_0_dst)); |
| 1881 tab_0_dst.Offset(0, GetDetachY(tab_strip)); | 1881 tab_0_dst.Offset(0, GetDetachY(tab_strip)); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1892 | 1892 |
| 1893 // Release the mouse | 1893 // Release the mouse |
| 1894 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( | 1894 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( |
| 1895 ui_controls::LEFT, ui_controls::UP)); | 1895 ui_controls::LEFT, ui_controls::UP)); |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 // Drags from browser from a second display to primary and releases input. | 1898 // Drags from browser from a second display to primary and releases input. |
| 1899 IN_PROC_BROWSER_TEST_F( | 1899 IN_PROC_BROWSER_TEST_F( |
| 1900 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest, | 1900 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest, |
| 1901 CancelDragTabToWindowIn1stDisplay) { | 1901 CancelDragTabToWindowIn1stDisplay) { |
| 1902 std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); | 1902 aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); |
| 1903 ASSERT_EQ(2u, roots.size()); | 1903 ASSERT_EQ(2u, roots.size()); |
| 1904 | 1904 |
| 1905 // Add another tab. | 1905 // Add another tab. |
| 1906 AddTabAndResetBrowser(browser()); | 1906 AddTabAndResetBrowser(browser()); |
| 1907 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 1907 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 1908 | 1908 |
| 1909 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); | 1909 EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); |
| 1910 EXPECT_EQ(roots[0], browser()->window()->GetNativeWindow()->GetRootWindow()); | 1910 EXPECT_EQ(roots[0], browser()->window()->GetNativeWindow()->GetRootWindow()); |
| 1911 | 1911 |
| 1912 gfx::Rect work_area = gfx::Screen::GetNativeScreen()-> | 1912 gfx::Rect work_area = gfx::Screen::GetNativeScreen()-> |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 DetachToDockedTabDragControllerTest, | 2154 DetachToDockedTabDragControllerTest, |
| 2155 ::testing::Values("mouse", "mouse docked")); | 2155 ::testing::Values("mouse", "mouse docked")); |
| 2156 INSTANTIATE_TEST_CASE_P(TabDragging, | 2156 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2157 DetachToBrowserTabDragControllerTestTouch, | 2157 DetachToBrowserTabDragControllerTestTouch, |
| 2158 ::testing::Values("touch", "touch docked")); | 2158 ::testing::Values("touch", "touch docked")); |
| 2159 #else | 2159 #else |
| 2160 INSTANTIATE_TEST_CASE_P(TabDragging, | 2160 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2161 DetachToBrowserTabDragControllerTest, | 2161 DetachToBrowserTabDragControllerTest, |
| 2162 ::testing::Values("mouse")); | 2162 ::testing::Values("mouse")); |
| 2163 #endif | 2163 #endif |
| OLD | NEW |