OLD | NEW |
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 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 bool(const std::string& extension_id, | 202 bool(const std::string& extension_id, |
203 const base::Callback<void(bool)>& callback)); | 203 const base::Callback<void(bool)>& callback)); |
204 | 204 |
205 private: | 205 private: |
206 DISALLOW_COPY_AND_ASSIGN(TestProcessManager); | 206 DISALLOW_COPY_AND_ASSIGN(TestProcessManager); |
207 }; | 207 }; |
208 | 208 |
209 // Mockable class for awaiting RegisterMediaRouteProvider callbacks. | 209 // Mockable class for awaiting RegisterMediaRouteProvider callbacks. |
210 class RegisterMediaRouteProviderHandler { | 210 class RegisterMediaRouteProviderHandler { |
211 public: | 211 public: |
212 MOCK_METHOD1(Invoke, void(const std::string& instance_id)); | 212 MOCK_METHOD1(Invoke, void(mojo::String instance_id)); |
213 }; | 213 }; |
214 | 214 |
215 TEST_F(MediaRouterMojoImplTest, CreateRoute) { | 215 TEST_F(MediaRouterMojoImplTest, CreateRoute) { |
216 MediaSource media_source(kSource); | 216 MediaSource media_source(kSource); |
217 MediaRoute expected_route(kRouteId, media_source, kSinkId, "", false, "", | 217 MediaRoute expected_route(kRouteId, media_source, kSinkId, "", false, "", |
218 false); | 218 false); |
219 | 219 |
220 // Use a lambda function as an invocation target here to work around | 220 // Use a lambda function as an invocation target here to work around |
221 // a limitation with GMock::Invoke that prevents it from using move-only types | 221 // a limitation with GMock::Invoke that prevents it from using move-only types |
222 // in runnable parameter lists. | 222 // in runnable parameter lists. |
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 EXPECT_CALL(mock_media_route_provider_, | 1632 EXPECT_CALL(mock_media_route_provider_, |
1633 UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id()))) | 1633 UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id()))) |
1634 .WillOnce(InvokeWithoutArgs([&run_loop2]() { | 1634 .WillOnce(InvokeWithoutArgs([&run_loop2]() { |
1635 run_loop2.Quit(); | 1635 run_loop2.Quit(); |
1636 })); | 1636 })); |
1637 | 1637 |
1638 run_loop2.Run(); | 1638 run_loop2.Run(); |
1639 } | 1639 } |
1640 | 1640 |
1641 } // namespace media_router | 1641 } // namespace media_router |
OLD | NEW |