Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc

Issue 2315443004: Remove calls to deprecated MessageLoop methods in chrome. (Closed)
Patch Set: remove unused include Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 #include "ash/common/shelf/shelf_view.h" 6 #include "ash/common/shelf/shelf_view.h"
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, -120);
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::MessageLoop::current()->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) {
177 // Don't shutdown when closing the last browser window. 177 // Don't shutdown when closing the last browser window.
178 ScopedKeepAlive test_keep_alive(KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS, 178 ScopedKeepAlive test_keep_alive(KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS,
179 KeepAliveRestartOption::DISABLED); 179 KeepAliveRestartOption::DISABLED);
180 180
(...skipping 17 matching lines...) Expand all
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::GetTargetRootWindow()); 206 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow());
207 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698