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/location.h" | 10 #include "base/location.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 EXPECT_EQ(2, view_model->view_size()); | 55 EXPECT_EQ(2, view_model->view_size()); |
56 return view_model->view_at(1)->GetBoundsInScreen(); | 56 return view_model->view_at(1)->GetBoundsInScreen(); |
57 } | 57 } |
58 | 58 |
59 void OpenBrowserUsingShelfOnRootWindow(aura::Window* root_window) { | 59 void OpenBrowserUsingShelfOnRootWindow(aura::Window* root_window) { |
60 ui::test::EventGenerator generator(root_window); | 60 ui::test::EventGenerator generator(root_window); |
61 gfx::Point center = | 61 gfx::Point center = |
62 GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); | 62 GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); |
63 gfx::Display display = | 63 gfx::Display display = |
64 ash::Shell::GetScreen()->GetDisplayNearestWindow(root_window); | 64 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window); |
65 const gfx::Point& origin = display.bounds().origin(); | 65 const gfx::Point& origin = display.bounds().origin(); |
66 center.Offset(- origin.x(), - origin.y()); | 66 center.Offset(- origin.x(), - origin.y()); |
67 generator.MoveMouseTo(center); | 67 generator.MoveMouseTo(center); |
68 generator.ClickLeftButton(); | 68 generator.ClickLeftButton(); |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 #if !defined(OS_CHROMEOS) | 73 #if !defined(OS_CHROMEOS) |
74 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay DISABLED_OpenBrowserUsingShelf
OnOtherDisplay | 74 #define MAYBE_OpenBrowserUsingShelfOnOtherDisplay DISABLED_OpenBrowserUsingShelf
OnOtherDisplay |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 // Next new browser must be created on 1st display. | 194 // Next new browser must be created on 1st display. |
195 ASSERT_EQ(2u, browser_list->size()); | 195 ASSERT_EQ(2u, browser_list->size()); |
196 EXPECT_EQ(root_windows[0], | 196 EXPECT_EQ(root_windows[0], |
197 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); | 197 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); |
198 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); | 198 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); |
199 | 199 |
200 // Balanced with the chrome::IncrementKeepAliveCount above. | 200 // Balanced with the chrome::IncrementKeepAliveCount above. |
201 chrome::DecrementKeepAliveCount(); | 201 chrome::DecrementKeepAliveCount(); |
202 } | 202 } |
OLD | NEW |