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

Unified Diff: chrome/test/base/ui_test_utils.h

Issue 9390038: Move automation/ui_controls to ui/ui_controls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_aura fix, sync Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.h
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index d407f080d49512058c267c1173476827745a69be..bdcc21ac8426f49e01eb26919e45f182ac06d64b 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -17,7 +17,6 @@
#include "base/process.h"
#include "base/scoped_temp_dir.h"
#include "base/string16.h"
-#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/test/automation/dom_element_proxy.h"
#include "content/public/browser/browser_thread.h"
@@ -28,12 +27,17 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/ui_controls/ui_controls.h"
#include "webkit/glue/window_open_disposition.h"
#if defined(OS_WIN)
#include "base/win/scoped_handle.h"
#endif
+#if defined(TOOLKIT_VIEWS)
+#include "ui/views/view.h"
+#endif
+
class AppModalDialog;
class BookmarkModel;
class Browser;
@@ -268,8 +272,8 @@ bool SendKeyPressAndWait(const Browser* browser,
WARN_UNUSED_RESULT;
// Sends a move event blocking until received. Returns true if the event was
-// successfully received. This uses ui_controls::SendMouse***NotifyWhenDone, see
-// it for details.
+// successfully received. This uses ui_controls::SendMouse***NotifyWhenDone,
+// see it for details.
bool SendMouseMoveSync(const gfx::Point& location) WARN_UNUSED_RESULT;
bool SendMouseEventsSync(ui_controls::MouseButton type,
int state) WARN_UNUSED_RESULT;
@@ -587,6 +591,30 @@ bool TakeRenderWidgetSnapshot(content::RenderWidgetHost* rwh,
bool TakeEntirePageSnapshot(content::RenderViewHost* rvh,
SkBitmap* bitmap) WARN_UNUSED_RESULT;
+// A combination of SendMouseMove to the middle of the view followed by
+// SendMouseEvents.
+void MoveMouseToCenterAndPress(
+#if defined(TOOLKIT_VIEWS)
+ views::View* view,
+#elif defined(TOOLKIT_GTK)
+ GtkWidget* widget,
+#elif defined(OS_MACOSX)
+ NSView* view,
+#endif
+ ui_controls::MouseButton button,
+ int state,
+ const base::Closure& task);
+
+namespace internal {
+
+// A utility function to send a mouse click event in a closure. It's shared by
+// ui_controls_linux.cc and ui_controls_mac.cc
+void ClickTask(ui_controls::MouseButton button,
+ int state,
+ const base::Closure& followup);
+
+} // namespace internal
+
} // namespace ui_test_utils
#endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698