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

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

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix. Created 9 years, 2 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.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/automation/ui_controls.h" 9 #include "chrome/browser/automation/ui_controls.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 18 matching lines...) Expand all
29 void ClickOnView(const Browser* browser, ViewID vid) { 29 void ClickOnView(const Browser* browser, ViewID vid) {
30 BrowserWindow* browser_window = browser->window(); 30 BrowserWindow* browser_window = browser->window();
31 DCHECK(browser_window); 31 DCHECK(browser_window);
32 views::View* view = 32 views::View* view =
33 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); 33 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid);
34 DCHECK(view); 34 DCHECK(view);
35 ui_controls::MoveMouseToCenterAndPress( 35 ui_controls::MoveMouseToCenterAndPress(
36 view, 36 view,
37 ui_controls::LEFT, 37 ui_controls::LEFT,
38 ui_controls::DOWN | ui_controls::UP, 38 ui_controls::DOWN | ui_controls::UP,
39 new MessageLoop::QuitTask()); 39 MessageLoop::QuitClosure());
40 RunMessageLoop(); 40 RunMessageLoop();
41 } 41 }
42 42
43 void HideNativeWindow(gfx::NativeWindow window) { 43 void HideNativeWindow(gfx::NativeWindow window) {
44 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of 44 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of
45 // using Windows API. 45 // using Windows API.
46 ::ShowWindow(window, SW_HIDE); 46 ::ShowWindow(window, SW_HIDE);
47 } 47 }
48 48
49 void ShowAndFocusNativeWindow(gfx::NativeWindow window) { 49 void ShowAndFocusNativeWindow(gfx::NativeWindow window) {
50 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of 50 // TODO(jcampan): retrieve the NativeWidgetWin and show/hide on it instead of
51 // using Windows API. 51 // using Windows API.
52 ::ShowWindow(window, SW_SHOW); 52 ::ShowWindow(window, SW_SHOW);
53 } 53 }
54 54
55 } // namespace ui_test_utils 55 } // 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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698