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

Side by Side Diff: chrome/browser/media/router/media_router_mojo_impl_unittest.cc

Issue 1420533008: [Media Router] Set initial sink availability to available in MRMojoImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/media/router/media_router_mojo_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 EXPECT_CALL(issue_observer2, 326 EXPECT_CALL(issue_observer2,
327 OnIssueUpdated(Pointee(EqualsIssue(expected_issue2)))); 327 OnIssueUpdated(Pointee(EqualsIssue(expected_issue2))));
328 media_router_proxy_->OnIssue(mojo_issue2.Pass()); 328 media_router_proxy_->OnIssue(mojo_issue2.Pass());
329 ProcessEventLoop(); 329 ProcessEventLoop();
330 330
331 issue_observer1.UnregisterObserver(); 331 issue_observer1.UnregisterObserver();
332 issue_observer2.UnregisterObserver(); 332 issue_observer2.UnregisterObserver();
333 } 333 }
334 334
335 TEST_F(MediaRouterMojoImplTest, RegisterAndUnregisterMediaSinksObserver) { 335 TEST_F(MediaRouterMojoImplTest, RegisterAndUnregisterMediaSinksObserver) {
336 router()->OnSinkAvailabilityUpdated(
337 interfaces::MediaRouter::SINK_AVAILABILITY_AVAILABLE);
336 MediaSource media_source(kSource); 338 MediaSource media_source(kSource);
337 339
338 MockMediaRouter mock_router; 340 MockMediaRouter mock_router;
339 EXPECT_CALL(mock_media_route_provider_, 341 EXPECT_CALL(mock_media_route_provider_,
340 StartObservingMediaSinks(mojo::String(kSource))) 342 StartObservingMediaSinks(mojo::String(kSource)))
341 .Times(2); 343 .Times(2);
342 EXPECT_CALL(mock_media_route_provider_, 344 EXPECT_CALL(mock_media_route_provider_,
343 StartObservingMediaSinks(mojo::String(kSource2))); 345 StartObservingMediaSinks(mojo::String(kSource2)));
344 346
345 MediaSinksObserver* captured_observer; 347 MediaSinksObserver* captured_observer;
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 EXPECT_CALL(provide_handler_, Invoke(testing::Not(""))); 948 EXPECT_CALL(provide_handler_, Invoke(testing::Not("")));
947 EXPECT_CALL(*process_manager_, IsEventPageSuspended(kExtensionId)) 949 EXPECT_CALL(*process_manager_, IsEventPageSuspended(kExtensionId))
948 .WillOnce(Return(false)); 950 .WillOnce(Return(false));
949 EXPECT_CALL(mock_media_route_provider_, CloseRoute(mojo::String(kRouteId2))) 951 EXPECT_CALL(mock_media_route_provider_, CloseRoute(mojo::String(kRouteId2)))
950 .Times(kMaxPendingRequests); 952 .Times(kMaxPendingRequests);
951 RegisterMediaRouteProvider(); 953 RegisterMediaRouteProvider();
952 ProcessEventLoop(); 954 ProcessEventLoop();
953 } 955 }
954 956
955 } // namespace media_router 957 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_mojo_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698