OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/shelf/shelf.h" | 5 #include "ash/shelf/shelf.h" |
6 #include "ash/shelf/shelf_view.h" | 6 #include "ash/shelf/shelf_view.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/shelf_test_api.h" | 8 #include "ash/test/shelf_test_api.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 gfx::Display display = | 60 gfx::Display display = |
61 ash::Shell::GetScreen()->GetDisplayNearestWindow(root_window); | 61 ash::Shell::GetScreen()->GetDisplayNearestWindow(root_window); |
62 const gfx::Point& origin = display.bounds().origin(); | 62 const gfx::Point& origin = display.bounds().origin(); |
63 center.Offset(- origin.x(), - origin.y()); | 63 center.Offset(- origin.x(), - origin.y()); |
64 generator.MoveMouseTo(center); | 64 generator.MoveMouseTo(center); |
65 generator.ClickLeftButton(); | 65 generator.ClickLeftButton(); |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 #if defined(OS_WIN) | 70 #if !defined(OS_CHROMEOS) |
71 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay DISABLED_OpenBrowserUsingShelf
OnOtherDisplay | 71 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay DISABLED_OpenBrowserUsingShelf
OnOtherDisplay |
72 #define MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay DISABLED_OpenBrowserUsin
gContextMenuOnOtherDisplay | 72 #define MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay DISABLED_OpenBrowserUsin
gContextMenuOnOtherDisplay |
73 #else | 73 #else |
74 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay OpenBrowserUsingShelfOnOtherDi
splay | 74 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay OpenBrowserUsingShelfOnOtherDi
splay |
75 #define MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay OpenBrowserUsingContextM
enuOnOtherDisplay | 75 #define MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay OpenBrowserUsingContextM
enuOnOtherDisplay |
76 #endif | 76 #endif |
77 | 77 |
78 IN_PROC_BROWSER_TEST_F(WindowSizerTest, | 78 IN_PROC_BROWSER_TEST_F(WindowSizerTest, |
79 MAYBE_OpenBrowserUsingShelfOnOtherDisplay) { | 79 MAYBE_OpenBrowserUsingShelfOnOtherDisplay) { |
80 // Don't shutdown when closing the last browser window. | 80 // Don't shutdown when closing the last browser window. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 // Next new browser must be created on 1st display. | 192 // Next new browser must be created on 1st display. |
193 ASSERT_EQ(2u, browser_list->size()); | 193 ASSERT_EQ(2u, browser_list->size()); |
194 EXPECT_EQ(root_windows[0], | 194 EXPECT_EQ(root_windows[0], |
195 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); | 195 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); |
196 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); | 196 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); |
197 | 197 |
198 // Balanced with the chrome::IncrementKeepAliveCount above. | 198 // Balanced with the chrome::IncrementKeepAliveCount above. |
199 chrome::DecrementKeepAliveCount(); | 199 chrome::DecrementKeepAliveCount(); |
200 } | 200 } |
OLD | NEW |