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

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

Issue 1747803003: MacViews: Implement Tab Dragging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extract DragsWindowUsingCocoaMoveLoop test, cleanup code. Created 4 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
Index: chrome/test/base/interactive_test_utils.h
diff --git a/chrome/test/base/interactive_test_utils.h b/chrome/test/base/interactive_test_utils.h
index f0ccc770f2a8cfae8ca6437cdfc83364527badf7..cd92d2c2af122dd459ecb9e573aa7f6f6eea8746 100644
--- a/chrome/test/base/interactive_test_utils.h
+++ b/chrome/test/base/interactive_test_utils.h
@@ -21,6 +21,18 @@ class View;
namespace ui_test_utils {
+#if defined(OS_MACOSX)
+// Moves the mouse to the |from| position, presses left mouse button,
+// then moves mouse to the |to| position, waits the |delay|, releases left mouse
+// button.
+// |steps| indicates number of intermediate points that are interpolated between
+// |from| and |to|.
+void DragAndDrop(const gfx::Point& from,
+ const gfx::Point& to,
+ base::TimeDelta delay = base::TimeDelta(),
tapted 2016/03/10 11:51:19 can the delay argument be removed? It might help w
themblsha 2016/03/10 17:18:58 I thought that this delay would be useful for test
+ unsigned int steps = 1);
tapted 2016/03/10 11:51:19 just int
themblsha 2016/03/10 17:18:58 Done.
+#endif // OS_MACOSX
+
// Brings the native window for |browser| to the foreground. Returns true on
// success.
bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT;

Powered by Google App Engine
This is Rietveld 408576698