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

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

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Address comments. Created 3 years, 7 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: content/public/test/browser_test_utils.h
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 4122a90711a5abfdb751c244b17710fe53460231..fdbacfee38d3b46ea765e39337a8af1301af93d3 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -850,6 +850,25 @@ class PwnMessageHelper {
DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper);
};
+#if defined(USE_AURA)
+// Mock of an OverscrollController so we can inspect the scroll events that it
+// receives. Note that this is only a partial mock as the methods of a real
+// OverscrollController are being invoked.
+// TODO(mcnee): Tests needing this are BrowserPlugin specific. Remove after
+// removing BrowserPlugin (crbug.com/533069).
+class MockOverscrollController {
+ public:
+ // Creates a mock and installs it on the given RenderWidgetHostViewAura.
+ // The returned mock is owned by the RWHVA.
+ static MockOverscrollController* Create(RenderWidgetHostView* rwhv);
+
+ virtual ~MockOverscrollController() {}
+
+ // Waits until the mock receives a consumed GestureScrollUpdate.
+ virtual void WaitForConsumedScroll() = 0;
+};
+#endif // defined(USE_AURA)
+
} // namespace content
#endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698