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 "content/browser/presentation/presentation_service_impl.h" | 5 #include "content/browser/presentation/presentation_service_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 MOCK_METHOD0(MessagesReceived, void()); | 229 MOCK_METHOD0(MessagesReceived, void()); |
230 | 230 |
231 void OnDefaultSessionStarted( | 231 void OnDefaultSessionStarted( |
232 blink::mojom::PresentationSessionInfoPtr session_info) override { | 232 blink::mojom::PresentationSessionInfoPtr session_info) override { |
233 OnDefaultSessionStarted(*session_info); | 233 OnDefaultSessionStarted(*session_info); |
234 } | 234 } |
235 MOCK_METHOD1(OnDefaultSessionStarted, | 235 MOCK_METHOD1(OnDefaultSessionStarted, |
236 void(const blink::mojom::PresentationSessionInfo& session_info)); | 236 void(const blink::mojom::PresentationSessionInfo& session_info)); |
237 | 237 |
238 void OnReceiverConnectionAvailable( | 238 void OnReceiverConnectionAvailable( |
239 blink::mojom::PresentationSessionInfoPtr session_info) override { | 239 blink::mojom::PresentationSessionInfoPtr session_info, |
| 240 blink::mojom::PresentationConnectionPtr connection) override { |
240 OnReceiverConnectionAvailable(*session_info); | 241 OnReceiverConnectionAvailable(*session_info); |
241 } | 242 } |
242 MOCK_METHOD1(OnReceiverConnectionAvailable, | 243 MOCK_METHOD1(OnReceiverConnectionAvailable, |
243 void(const blink::mojom::PresentationSessionInfo& session_info)); | 244 void(const blink::mojom::PresentationSessionInfo& session_info)); |
244 | 245 |
245 std::vector<blink::mojom::SessionMessagePtr> messages_received_; | 246 std::vector<blink::mojom::SessionMessagePtr> messages_received_; |
246 }; | 247 }; |
247 | 248 |
248 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { | 249 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { |
249 public: | 250 public: |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 mock_delegate_.set_screen_availability_listening_supported(false); | 950 mock_delegate_.set_screen_availability_listening_supported(false); |
950 base::RunLoop run_loop; | 951 base::RunLoop run_loop; |
951 EXPECT_CALL(mock_client_, | 952 EXPECT_CALL(mock_client_, |
952 OnScreenAvailabilityNotSupported(presentation_url1_)) | 953 OnScreenAvailabilityNotSupported(presentation_url1_)) |
953 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); | 954 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); |
954 ListenForScreenAvailabilityAndWait(presentation_url1_, false); | 955 ListenForScreenAvailabilityAndWait(presentation_url1_, false); |
955 run_loop.Run(); | 956 run_loop.Run(); |
956 } | 957 } |
957 | 958 |
958 } // namespace content | 959 } // namespace content |
OLD | NEW |