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

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

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Add test to verify OverscrollController sees consumed scrolls. 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..e64b53f7d133de41d3eea19c80bb73ea6d7c918e 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -850,6 +850,23 @@ class PwnMessageHelper {
DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper);
};
+#if defined(USE_AURA)
+// Wraps an OverscrollController so we can inspect the scroll events that it
+// receives.
+// TODO(mcnee): Tests needing this are BrowserPlugin specific
+// (crbug.com/533069).
Charlie Reis 2017/05/30 22:35:17 I don't understand this TODO. Can you rephrase it
Kevin McNee 2017/05/31 18:07:35 Done.
+class OverscrollControllerSpy {
Charlie Reis 2017/05/30 22:35:17 Is spy a design pattern? I don't many instances o
Kevin McNee 2017/05/31 18:07:35 It's essentially a partial mock. We're inspecting
+ public:
+ // Creates a spy and installs it on the given RenderWidgetHostViewAura.
+ // The returned spy is owned by the RWHVA.
+ static OverscrollControllerSpy* Create(RenderWidgetHostView* rwhv);
+
+ virtual ~OverscrollControllerSpy() {}
+
+ virtual void WaitForScrollStateContentScrolling() = 0;
Charlie Reis 2017/05/30 22:35:17 Needs a comment.
Kevin McNee 2017/05/31 18:07:35 Done.
+};
+#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