Chromium Code Reviews| 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_view.h" | 5 #include "ash/shelf/shelf_view.h" |
| 6 #include "ash/shelf/wm_shelf.h" | 6 #include "ash/shelf/wm_shelf.h" |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm_window.h" | 8 #include "ash/wm_window.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 } | 156 } |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 DISALLOW_COPY_AND_ASSIGN(WindowSizerContextMenuTest); | 159 DISALLOW_COPY_AND_ASSIGN(WindowSizerContextMenuTest); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 void OpenBrowserUsingContextMenuOnRootWindow(aura::Window* root_window) { | 162 void OpenBrowserUsingContextMenuOnRootWindow(aura::Window* root_window) { |
| 163 gfx::Point chrome_icon = | 163 gfx::Point chrome_icon = |
| 164 GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); | 164 GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); |
| 165 gfx::Point release_point = chrome_icon; | 165 gfx::Point release_point = chrome_icon; |
| 166 release_point.Offset(50, -120); | 166 release_point.Offset(50, -153); |
|
dschuyler
2017/05/08 20:46:58
Consider a comment about the constants 50 and -153
| |
| 167 ui_controls::SendMouseMoveNotifyWhenDone( | 167 ui_controls::SendMouseMoveNotifyWhenDone( |
| 168 chrome_icon.x(), chrome_icon.y(), | 168 chrome_icon.x(), chrome_icon.y(), |
| 169 base::Bind(&WindowSizerContextMenuTest::Step1, release_point)); | 169 base::Bind(&WindowSizerContextMenuTest::Step1, release_point)); |
| 170 base::RunLoop().Run(); | 170 base::RunLoop().Run(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace | 173 } // namespace |
| 174 | 174 |
| 175 IN_PROC_BROWSER_TEST_F(WindowSizerContextMenuTest, | 175 IN_PROC_BROWSER_TEST_F(WindowSizerContextMenuTest, |
| 176 MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay) { | 176 MAYBE_OpenBrowserUsingContextMenuOnOtherDisplay) { |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 198 | 198 |
| 199 CloseBrowser(browser_list->get(0)); | 199 CloseBrowser(browser_list->get(0)); |
| 200 OpenBrowserUsingContextMenuOnRootWindow(root_windows[0]); | 200 OpenBrowserUsingContextMenuOnRootWindow(root_windows[0]); |
| 201 | 201 |
| 202 // Next new browser must be created on 1st display. | 202 // Next new browser must be created on 1st display. |
| 203 ASSERT_EQ(1u, browser_list->size()); | 203 ASSERT_EQ(1u, browser_list->size()); |
| 204 EXPECT_EQ(root_windows[0], | 204 EXPECT_EQ(root_windows[0], |
| 205 browser_list->get(0)->window()->GetNativeWindow()->GetRootWindow()); | 205 browser_list->get(0)->window()->GetNativeWindow()->GetRootWindow()); |
| 206 EXPECT_EQ(root_windows[0], ash::Shell::GetRootWindowForNewWindows()); | 206 EXPECT_EQ(root_windows[0], ash::Shell::GetRootWindowForNewWindows()); |
| 207 } | 207 } |
| OLD | NEW |