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

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

Issue 8298007: Aura: unit_tests now run on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ui_test_utils_aura Bind 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
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 19 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698