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

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_test.h

Issue 2873893003: [Media Router] Add features to control browser side discovery (Closed)
Patch Set: resolve code review comments from Mark 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: chrome/browser/media/router/mojo/media_router_mojo_test.h
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_test.h b/chrome/browser/media/router/mojo/media_router_mojo_test.h
index 21935d7fbf1b6482daf38e24b1086aef76467e97..f568d212c943b5153ffcc7340e9866c6a1c4203a 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_test.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_test.h
@@ -174,6 +174,23 @@ class MockMediaRouteControllerObserver : public MediaRouteController::Observer {
MOCK_METHOD0(OnControllerInvalidated, void());
};
+// Mockable class for awaiting RegisterMediaRouteProvider callbacks.
+class RegisterMediaRouteProviderHandler {
+ public:
+ RegisterMediaRouteProviderHandler();
+ ~RegisterMediaRouteProviderHandler();
+
+ // A wrapper function to deal with move only parameter |config|.
+ void Invoke(const std::string& instance_id,
+ mojom::MediaRouteProviderConfigPtr config) {
+ InvokeInternal(instance_id, config.get());
+ }
+
+ MOCK_METHOD2(InvokeInternal,
+ void(const std::string& instance_id,
+ mojom::MediaRouteProviderConfig* config));
+};
+
// Tests the API call flow between the MediaRouterMojoImpl and the Media Router
// Mojo service in both directions.
class MediaRouterMojoTest : public ::testing::Test {
@@ -200,6 +217,8 @@ class MediaRouterMojoTest : public ::testing::Test {
// Mojo proxy object for |mock_media_router_|
media_router::mojom::MediaRouterPtr media_router_proxy_;
+ RegisterMediaRouteProviderHandler provide_handler_;
+
private:
content::TestBrowserThreadBundle test_thread_bundle_;
scoped_refptr<extensions::Extension> extension_;

Powered by Google App Engine
This is Rietveld 408576698