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 #else | 72 #else |
73 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay OpenBrowserUsingShelfOnOtherDi
splay | 73 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay OpenBrowserUsingShelfOnOtherDi
splay |
74 #endif | 74 #endif |
75 | 75 |
76 IN_PROC_BROWSER_TEST_F(WindowSizerTest, | 76 IN_PROC_BROWSER_TEST_F(WindowSizerTest, |
77 MAYBE_OpenBrowserUsingShelfOnOtherDisplay) { | 77 MAYBE_OpenBrowserUsingShelfOnOtherDisplay) { |
78 // Don't shutdown when closing the last browser window. | 78 // Don't shutdown when closing the last browser window. |
79 chrome::IncrementKeepAliveCount(); | 79 chrome::IncrementKeepAliveCount(); |
80 | 80 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // Next new browser must be created on 1st display. | 191 // Next new browser must be created on 1st display. |
192 EXPECT_EQ(2u, browser_list->size()); | 192 EXPECT_EQ(2u, browser_list->size()); |
193 EXPECT_EQ(root_windows[0], | 193 EXPECT_EQ(root_windows[0], |
194 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); | 194 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); |
195 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); | 195 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); |
196 | 196 |
197 // Balanced with the chrome::IncrementKeepAliveCount above. | 197 // Balanced with the chrome::IncrementKeepAliveCount above. |
198 chrome::DecrementKeepAliveCount(); | 198 chrome::DecrementKeepAliveCount(); |
199 } | 199 } |
OLD | NEW |