summaryrefslogtreecommitdiffstats
path: root/content/public/test/browser_test_utils.h
diff options
context:
space:
mode:
authorwjmaclean <wjmaclean@chromium.org>2015-09-25 08:56:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-25 15:57:28 +0000
commit73b15a29e89b0150b8ba5ed4b43af298d30bc3da (patch)
treea0c7f37c16860f911b7a41200c1b956825c8bc5a /content/public/test/browser_test_utils.h
parentf01be0af7ae9802034a89e05187a0da91d4a2f50 (diff)
downloadchromium_src-73b15a29e89b0150b8ba5ed4b43af298d30bc3da.zip
chromium_src-73b15a29e89b0150b8ba5ed4b43af298d30bc3da.tar.gz
chromium_src-73b15a29e89b0150b8ba5ed4b43af298d30bc3da.tar.bz2
Resend unconsumed scroll updates from guest back to embedder.
(WebView scroll bubbling) This CL provides a pathway for a guest process to return unconsumed scroll updates to its embedder, in order to allow scroll bubbling. The events are marked with the embedder's BrowserPlugin instance id so that when the BrowserPlugin sees the re-sent event it will know to mark it as not-handled so the normal bubbling process can occur within Blink. Note that any scroll event that targets a WebView guest is, by definition, on Blink's main-thread so that it can be processed by BrowserPlugin and forwarded to the guest. ScrollUpdates going to the guest outside of a GestureScrollBegin and GestureScrollEnd/GestureFLingStart pair are surpressed: these are generated by fling curves, but will cause problems in the guest's InputHandlerProxy since it never expects to get them. This CL depends on https://codereview.chromium.org/1308313005/ landing first as it provides the necessary modifications to events to (1) carry the resend source info, and (2) forward GestureFlingStart to the guest via BrowserPlugin. Finally: note that when WebView-tag transitions to OOPIF that much of this code will be redundant and can be removed as part of the larger effort to cleanup (i.e. remove) BrowserPlugin. BUG=491940 Review URL: https://codereview.chromium.org/1308273003 Cr-Commit-Position: refs/heads/master@{#350838}
Diffstat (limited to 'content/public/test/browser_test_utils.h')
-rw-r--r--content/public/test/browser_test_utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index ee1d903..7f90d70 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -113,6 +113,16 @@ void SimulateMouseEvent(WebContents* web_contents,
blink::WebInputEvent::Type type,
const gfx::Point& point);
+// Simulate a mouse wheel event.
+void SimulateMouseWheelEvent(WebContents* web_contents,
+ const gfx::Point& point,
+ const gfx::Vector2d& delta);
+
+// Sends a simple, three-event (Begin/Update/End) gesture scroll.
+void SimulateGestureScrollSequence(WebContents* web_contents,
+ const gfx::Point& point,
+ const gfx::Vector2dF& delta);
+
// Taps the screen at |point|.
void SimulateTapAt(WebContents* web_contents, const gfx::Point& point);