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

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

Issue 2737413003: [Presentation API] Remove references to presentation sessions. (Closed)
Patch Set: Update PresentationServiceDelegateImpl unittest Created 3 years, 9 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 #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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 router()->OnRouteMessagesReceived(expected_route_id, incoming_batch2); 1091 router()->OnRouteMessagesReceived(expected_route_id, incoming_batch2);
1092 router()->OnRouteMessagesReceived(expected_route_id, incoming_batch3); 1092 router()->OnRouteMessagesReceived(expected_route_id, incoming_batch3);
1093 // As each |observer| goes out-of-scope, its destructor will ensure all 1093 // As each |observer| goes out-of-scope, its destructor will ensure all
1094 // expected messages have been received. 1094 // expected messages have been received.
1095 } 1095 }
1096 1096
1097 TEST_F(MediaRouterMojoImplTest, PresentationConnectionStateChangedCallback) { 1097 TEST_F(MediaRouterMojoImplTest, PresentationConnectionStateChangedCallback) {
1098 MediaRoute::Id route_id("route-id"); 1098 MediaRoute::Id route_id("route-id");
1099 const GURL presentation_url("http://www.example.com/presentation.html"); 1099 const GURL presentation_url("http://www.example.com/presentation.html");
1100 const std::string kPresentationId("pid"); 1100 const std::string kPresentationId("pid");
1101 content::PresentationSessionInfo connection(presentation_url, 1101 content::PresentationInfo connection(presentation_url, kPresentationId);
1102 kPresentationId);
1103 base::MockCallback<content::PresentationConnectionStateChangedCallback> 1102 base::MockCallback<content::PresentationConnectionStateChangedCallback>
1104 callback; 1103 callback;
1105 std::unique_ptr<PresentationConnectionStateSubscription> subscription = 1104 std::unique_ptr<PresentationConnectionStateSubscription> subscription =
1106 router()->AddPresentationConnectionStateChangedCallback(route_id, 1105 router()->AddPresentationConnectionStateChangedCallback(route_id,
1107 callback.Get()); 1106 callback.Get());
1108 1107
1109 { 1108 {
1110 base::RunLoop run_loop; 1109 base::RunLoop run_loop;
1111 content::PresentationConnectionStateChangeInfo closed_info( 1110 content::PresentationConnectionStateChangeInfo closed_info(
1112 content::PRESENTATION_CONNECTION_STATE_CLOSED); 1111 content::PRESENTATION_CONNECTION_STATE_CLOSED);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 EXPECT_CALL(mock_media_route_provider_, 1577 EXPECT_CALL(mock_media_route_provider_,
1579 UpdateMediaSinks(MediaSourceForDesktop().id())) 1578 UpdateMediaSinks(MediaSourceForDesktop().id()))
1580 .WillOnce(InvokeWithoutArgs([&run_loop2]() { 1579 .WillOnce(InvokeWithoutArgs([&run_loop2]() {
1581 run_loop2.Quit(); 1580 run_loop2.Quit();
1582 })); 1581 }));
1583 1582
1584 run_loop2.Run(); 1583 run_loop2.Run();
1585 } 1584 }
1586 1585
1587 } // namespace media_router 1586 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/mojo/media_router.typemap ('k') | chrome/browser/media/router/offscreen_presentation_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698