summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop/drag_drop_tracker_unittest.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-27 00:37:55 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-27 00:37:55 +0000
commit96ea228ed88492c273aa234d1aa8dc630cd7a935 (patch)
tree9d431fd9167e59fe3288920f2bd202638811831c /ash/drag_drop/drag_drop_tracker_unittest.cc
parent950f9ce2cda8b1599b086b2069f5fae5baeb4f7b (diff)
downloadchromium_src-96ea228ed88492c273aa234d1aa8dc630cd7a935.zip
chromium_src-96ea228ed88492c273aa234d1aa8dc630cd7a935.tar.gz
chromium_src-96ea228ed88492c273aa234d1aa8dc630cd7a935.tar.bz2
Open new window on active display unless the location is given.
BUG=164074 TEST=covered by test. Review URL: https://chromiumcodereview.appspot.com/11665013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop/drag_drop_tracker_unittest.cc')
-rw-r--r--ash/drag_drop/drag_drop_tracker_unittest.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc
index d8a1f10..7113c22 100644
--- a/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ b/ash/drag_drop/drag_drop_tracker_unittest.cc
@@ -62,17 +62,17 @@ TEST_F(DragDropTrackerTest, MAYBE_GetTarget) {
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_EQ(2U, root_windows.size());
- Shell::GetInstance()->set_active_root_window(root_windows[0]);
-
scoped_ptr<aura::Window> window0(
CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
window0->Show();
- Shell::GetInstance()->set_active_root_window(root_windows[1]);
-
scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(100, 100, 100, 100)));
+ CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
window1->Show();
+ EXPECT_EQ(root_windows[0], window0->GetRootWindow());
+ EXPECT_EQ(root_windows[1], window1->GetRootWindow());
+ EXPECT_EQ("0,0 100x100", window0->GetBoundsInScreen().ToString());
+ EXPECT_EQ("300,100 100x100", window1->GetBoundsInScreen().ToString());
// Make RootWindow0 active so that capture window is parented to it.
Shell::GetInstance()->set_active_root_window(root_windows[0]);
@@ -129,14 +129,12 @@ TEST_F(DragDropTrackerTest, MAYBE_ConvertEvent) {
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_EQ(2U, root_windows.size());
- Shell::GetInstance()->set_active_root_window(root_windows[0]);
scoped_ptr<aura::Window> window0(
CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
window0->Show();
- Shell::GetInstance()->set_active_root_window(root_windows[1]);
scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(100, 100, 100, 100)));
+ CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
window1->Show();
// Make RootWindow0 active so that capture window is parented to it.