| Index: content/browser/presentation/presentation_service_impl_unittest.cc
|
| diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
|
| index 578409f06425ea8178c18344606342bf7da1d117..c33a8d33c161d6095726dc63e2cee9b55defbe6e 100644
|
| --- a/content/browser/presentation/presentation_service_impl_unittest.cc
|
| +++ b/content/browser/presentation/presentation_service_impl_unittest.cc
|
| @@ -148,11 +148,10 @@ class MockPresentationServiceDelegate
|
| const content::PresentationConnectionStateChangedCallback&
|
| state_changed_cb));
|
|
|
| - void ConnectToOffscreenPresentation(
|
| - int render_process_id,
|
| - int render_frame_id,
|
| - const content::PresentationSessionInfo& session,
|
| - PresentationConnectionPtr connection) override {
|
| + void ConnectToPresentation(int render_process_id,
|
| + int render_frame_id,
|
| + const content::PresentationSessionInfo& session,
|
| + PresentationConnectionPtr connection) override {
|
| RegisterOffscreenPresentationConnectionRaw(
|
| render_process_id, render_frame_id, session, connection.get());
|
| }
|
| @@ -195,7 +194,7 @@ class MockPresentationConnection : public blink::mojom::PresentationConnection {
|
| void(blink::mojom::PresentationConnection& connection));
|
|
|
| void OnMessage(blink::mojom::SessionMessagePtr message,
|
| - const base::Callback<void(bool)>& send_message_cb) override {
|
| + const base::Callback<void(bool)>& callback) override {
|
| OnConnectionMessageReceived(*message);
|
| }
|
| MOCK_METHOD1(OnConnectionMessageReceived,
|
| @@ -247,7 +246,8 @@ class MockPresentationServiceClient
|
| void(const blink::mojom::PresentationSessionInfo& session_info));
|
|
|
| void OnReceiverConnectionAvailable(
|
| - blink::mojom::PresentationSessionInfoPtr session_info) override {
|
| + blink::mojom::PresentationSessionInfoPtr session_info,
|
| + blink::mojom::PresentationConnectionPtr connection) override {
|
| OnReceiverConnectionAvailable(*session_info);
|
| }
|
| MOCK_METHOD1(OnReceiverConnectionAvailable,
|
| @@ -548,8 +548,7 @@ TEST_F(PresentationServiceImplTest, SetDefaultPresentationUrls) {
|
| run_loop.Run();
|
| }
|
|
|
| -TEST_F(PresentationServiceImplTest,
|
| - ListenForConnectionStateChangeAndChangeState) {
|
| +TEST_F(PresentationServiceImplTest, ListenForConnectionStateChange) {
|
| content::PresentationSessionInfo connection(presentation_url1_,
|
| kPresentationId, false);
|
| content::PresentationConnectionStateChangedCallback state_changed_cb;
|
| @@ -560,11 +559,7 @@ TEST_F(PresentationServiceImplTest,
|
|
|
| EXPECT_CALL(mock_delegate_, ListenForConnectionStateChange(_, _, _, _))
|
| .WillOnce(SaveArg<3>(&state_changed_cb));
|
| - EXPECT_CALL(mock_client_,
|
| - OnConnectionStateChanged(
|
| - SessionInfoEquals(ByRef(presentation_connection)),
|
| - blink::mojom::PresentationConnectionState::CONNECTED));
|
| - service_impl_->ListenForConnectionStateChangeAndChangeState(connection);
|
| + service_impl_->ListenForConnectionStateChange(connection);
|
|
|
| {
|
| base::RunLoop run_loop;
|
| @@ -585,7 +580,7 @@ TEST_F(PresentationServiceImplTest, ListenForConnectionClose) {
|
| content::PresentationConnectionStateChangedCallback state_changed_cb;
|
| EXPECT_CALL(mock_delegate_, ListenForConnectionStateChange(_, _, _, _))
|
| .WillOnce(SaveArg<3>(&state_changed_cb));
|
| - service_impl_->ListenForConnectionStateChangeAndChangeState(connection);
|
| + service_impl_->ListenForConnectionStateChange(connection);
|
|
|
| // Trigger connection close. It should be propagated back up to
|
| // |mock_client_|.
|
|
|