OLD | NEW |
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 19 matching lines...) Expand all Loading... |
30 void ClickOnView(const Browser* browser, ViewID vid) { | 30 void ClickOnView(const Browser* browser, ViewID vid) { |
31 BrowserWindow* browser_window = browser->window(); | 31 BrowserWindow* browser_window = browser->window(); |
32 DCHECK(browser_window); | 32 DCHECK(browser_window); |
33 views::View* view = | 33 views::View* view = |
34 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); | 34 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); |
35 DCHECK(view); | 35 DCHECK(view); |
36 ui_controls::MoveMouseToCenterAndPress( | 36 ui_controls::MoveMouseToCenterAndPress( |
37 view, | 37 view, |
38 ui_controls::LEFT, | 38 ui_controls::LEFT, |
39 ui_controls::DOWN | ui_controls::UP, | 39 ui_controls::DOWN | ui_controls::UP, |
40 new MessageLoop::QuitTask()); | 40 MessageLoop::QuitClosure()); |
41 RunMessageLoop(); | 41 RunMessageLoop(); |
42 } | 42 } |
43 | 43 |
44 void HideNativeWindow(gfx::NativeWindow window) { | 44 void HideNativeWindow(gfx::NativeWindow window) { |
45 window->Hide(); | 45 window->Hide(); |
46 } | 46 } |
47 | 47 |
48 void ShowAndFocusNativeWindow(gfx::NativeWindow window) { | 48 void ShowAndFocusNativeWindow(gfx::NativeWindow window) { |
49 window->Show(); | 49 window->Show(); |
50 } | 50 } |
51 | 51 |
52 } // namespace ui_test_utils | 52 } // namespace ui_test_utils |
OLD | NEW |