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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 1008233002: Add a test for a simulated click on a link on tapping of gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 61aa5f504ff156cc612c3aa413b3b7b0f197aacd..6ac4f13a9e79ed51e1c3ef7ff26c05d70e011fd0 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -408,6 +408,20 @@ void SimulateTapAt(WebContents* web_contents, const gfx::Point& point) {
tap.type = blink::WebGestureEvent::GestureTap;
tap.x = point.x();
tap.y = point.y();
+ tap.modifiers = blink::WebInputEvent::ControlKey;
+ RenderWidgetHostImpl* widget_host =
+ RenderWidgetHostImpl::From(web_contents->GetRenderViewHost());
+ widget_host->ForwardGestureEvent(tap);
+}
+
+void SimulateTapWithModifiersAt(WebContents* web_contents,
+ unsigned modifiers,
+ const gfx::Point& point) {
+ blink::WebGestureEvent tap;
+ tap.type = blink::WebGestureEvent::GestureTap;
+ tap.x = point.x();
+ tap.y = point.y();
+ tap.modifiers = modifiers;
RenderWidgetHostImpl* widget_host =
RenderWidgetHostImpl::From(web_contents->GetRenderViewHost());
widget_host->ForwardGestureEvent(tap);
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698