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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 2327623002: X11: Add TestDesktopScreenX11 to simulate mouse movement in ui tests (Closed)
Patch Set: Move test_desktop_screen_x11 to test_support_internal Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // Drag to target_tab_strip. This should stop the nested loop from dragging 666 // Drag to target_tab_strip. This should stop the nested loop from dragging
667 // the window. 667 // the window.
668 gfx::Point target_point(target_tab_strip->width() -1, 668 gfx::Point target_point(target_tab_strip->width() -1,
669 target_tab_strip->height() / 2); 669 target_tab_strip->height() / 2);
670 views::View::ConvertPointToScreen(target_tab_strip, &target_point); 670 views::View::ConvertPointToScreen(target_tab_strip, &target_point);
671 ASSERT_TRUE(test->DragInputToAsync(target_point)); 671 ASSERT_TRUE(test->DragInputToAsync(target_point));
672 } 672 }
673 673
674 } // namespace 674 } // namespace
675 675
676 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
677 // TODO: Disabled as mouse isn't updated propertly, http://crbug.com/640741.
678 #define MAYBE_DragToSeparateWindow DISABLED_DragToSeparateWindow
679 #else
680 #define MAYBE_DragToSeparateWindow DragToSeparateWindow
681 #endif
682 // Creates two browsers, drags from first into second. 676 // Creates two browsers, drags from first into second.
683 IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, 677 IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
684 MAYBE_DragToSeparateWindow) { 678 DragToSeparateWindow) {
685 TabStrip* tab_strip = GetTabStripForBrowser(browser()); 679 TabStrip* tab_strip = GetTabStripForBrowser(browser());
686 680
687 // Add another tab to browser(). 681 // Add another tab to browser().
688 AddTabAndResetBrowser(browser()); 682 AddTabAndResetBrowser(browser());
689 683
690 // Create another browser. 684 // Create another browser.
691 Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); 685 Browser* browser2 = CreateAnotherWindowBrowserAndRelayout();
692 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); 686 TabStrip* tab_strip2 = GetTabStripForBrowser(browser2);
693 687
694 // Move to the first tab and drag it enough so that it detaches, but not 688 // Move to the first tab and drag it enough so that it detaches, but not
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 DetachToBrowserTabDragControllerTest, 2499 DetachToBrowserTabDragControllerTest,
2506 ::testing::Values("mouse", "touch")); 2500 ::testing::Values("mouse", "touch"));
2507 INSTANTIATE_TEST_CASE_P(TabDragging, 2501 INSTANTIATE_TEST_CASE_P(TabDragging,
2508 DetachToBrowserTabDragControllerTestTouch, 2502 DetachToBrowserTabDragControllerTestTouch,
2509 ::testing::Values("touch")); 2503 ::testing::Values("touch"));
2510 #else 2504 #else
2511 INSTANTIATE_TEST_CASE_P(TabDragging, 2505 INSTANTIATE_TEST_CASE_P(TabDragging,
2512 DetachToBrowserTabDragControllerTest, 2506 DetachToBrowserTabDragControllerTest,
2513 ::testing::Values("mouse")); 2507 ::testing::Values("mouse"));
2514 #endif 2508 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698