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

Side by Side Diff: chrome/test/base/ui_test_utils_win.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/ui_test_utils_mac.mm ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 BrowserWindow* browser_window = browser->window(); 68 BrowserWindow* browser_window = browser->window();
69 DCHECK(browser_window); 69 DCHECK(browser_window);
70 views::View* view = 70 views::View* view =
71 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); 71 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid);
72 DCHECK(view); 72 DCHECK(view);
73 MoveMouseToCenterAndPress( 73 MoveMouseToCenterAndPress(
74 view, 74 view,
75 ui_controls::LEFT, 75 ui_controls::LEFT,
76 ui_controls::DOWN | ui_controls::UP, 76 ui_controls::DOWN | ui_controls::UP,
77 MessageLoop::QuitClosure()); 77 MessageLoop::QuitClosure());
78 RunMessageLoop(); 78 content::RunMessageLoop();
79 } 79 }
80 80
81 void HideNativeWindow(gfx::NativeWindow window) { 81 void HideNativeWindow(gfx::NativeWindow window) {
82 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of 82 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of
83 // using Windows API. 83 // using Windows API.
84 ::ShowWindow(window, SW_HIDE); 84 ::ShowWindow(window, SW_HIDE);
85 } 85 }
86 86
87 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) { 87 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) {
88 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of 88 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { 144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) {
145 FilePath desktop; 145 FilePath desktop;
146 146
147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) && 147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) &&
148 SaveScreenSnapshotToDirectory(desktop, screenshot_path); 148 SaveScreenSnapshotToDirectory(desktop, screenshot_path);
149 } 149 }
150 150
151 } // namespace ui_test_utils 151 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils_mac.mm ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698