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

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

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/window_sizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/property_bag.h" 10 #include "base/property_bag.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() { 131 Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() {
132 // Add another tab. 132 // Add another tab.
133 AddTabAndResetBrowser(browser()); 133 AddTabAndResetBrowser(browser());
134 134
135 // Create another browser. 135 // Create another browser.
136 Browser* browser2 = CreateBrowser(browser()->profile()); 136 Browser* browser2 = CreateBrowser(browser()->profile());
137 ResetIDs(browser2->tab_strip_model(), 100); 137 ResetIDs(browser2->tab_strip_model(), 100);
138 138
139 // Resize the two windows so they're right next to each other. 139 // Resize the two windows so they're right next to each other.
140 gfx::Rect work_area = gfx::Screen::GetMonitorNearestWindow( 140 gfx::Rect work_area = gfx::Screen::GetDisplayNearestWindow(
141 browser()->window()->GetNativeWindow()).work_area(); 141 browser()->window()->GetNativeWindow()).work_area();
142 gfx::Size half_size = 142 gfx::Size half_size =
143 gfx::Size(work_area.width() / 3 - 10, work_area.height() / 2 - 10); 143 gfx::Size(work_area.width() / 3 - 10, work_area.height() / 2 - 10);
144 browser()->window()->SetBounds(gfx::Rect(work_area.origin(), half_size)); 144 browser()->window()->SetBounds(gfx::Rect(work_area.origin(), half_size));
145 browser2->window()->SetBounds(gfx::Rect( 145 browser2->window()->SetBounds(gfx::Rect(
146 work_area.x() + half_size.width(), work_area.y(), 146 work_area.x() + half_size.width(), work_area.y(),
147 half_size.width(), half_size.height())); 147 half_size.width(), half_size.height()));
148 return browser2; 148 return browser2;
149 } 149 }
150 150
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 // Release the mouse, stopping the drag session. 651 // Release the mouse, stopping the drag session.
652 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( 652 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
653 ui_controls::LEFT, ui_controls::UP)); 653 ui_controls::LEFT, ui_controls::UP));
654 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); 654 ASSERT_FALSE(tab_strip2->IsDragSessionActive());
655 ASSERT_FALSE(tab_strip->IsDragSessionActive()); 655 ASSERT_FALSE(tab_strip->IsDragSessionActive());
656 ASSERT_FALSE(TabDragController::IsActive()); 656 ASSERT_FALSE(TabDragController::IsActive());
657 EXPECT_EQ("0 100", IDString(browser2->tab_strip_model())); 657 EXPECT_EQ("0 100", IDString(browser2->tab_strip_model()));
658 EXPECT_EQ("1", IDString(browser()->tab_strip_model())); 658 EXPECT_EQ("1", IDString(browser()->tab_strip_model()));
659 } 659 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/window_sizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698