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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_test.h

Issue 1911183002: [Media Router] Implement an internal Media Routes observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Tests the API call flow between the MediaRouterMojoImpl and the Media Router 104 // Tests the API call flow between the MediaRouterMojoImpl and the Media Router
105 // Mojo service in both directions. 105 // Mojo service in both directions.
106 class MediaRouterMojoTest : public ::testing::Test { 106 class MediaRouterMojoTest : public ::testing::Test {
107 public: 107 public:
108 MediaRouterMojoTest(); 108 MediaRouterMojoTest();
109 ~MediaRouterMojoTest() override; 109 ~MediaRouterMojoTest() override;
110 110
111 protected: 111 protected:
112 void SetUp() override; 112 void SetUp() override;
113 void TearDown() override;
113 114
114 void ProcessEventLoop(); 115 void ProcessEventLoop();
115 116
116 void ConnectProviderManagerService(); 117 void ConnectProviderManagerService();
117 118
118 const std::string& extension_id() const { return extension_->id(); } 119 const std::string& extension_id() const { return extension_->id(); }
119 120
120 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } 121 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); }
121 122
122 // Mock objects. 123 // Mock objects.
123 MockMediaRouteProvider mock_media_route_provider_; 124 MockMediaRouteProvider mock_media_route_provider_;
124 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_; 125 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_;
125 126
126 // Mojo proxy object for |mock_media_router_| 127 // Mojo proxy object for |mock_media_router_|
127 media_router::interfaces::MediaRouterPtr media_router_proxy_; 128 media_router::interfaces::MediaRouterPtr media_router_proxy_;
128 129
129 private: 130 private:
130 content::TestBrowserThreadBundle test_thread_bundle_; 131 content::TestBrowserThreadBundle test_thread_bundle_;
131 scoped_refptr<extensions::Extension> extension_; 132 scoped_refptr<extensions::Extension> extension_;
132 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; 133 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_;
133 std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_; 134 std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
134 135
135 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); 136 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest);
136 }; 137 };
137 138
138 } // namespace media_router 139 } // namespace media_router
139 140
140 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 141 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698