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

Side by Side Diff: content/browser/presentation/presentation_service_impl_unittest.cc

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: rebase Created 4 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
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 "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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 MOCK_METHOD0(MessagesReceived, void()); 237 MOCK_METHOD0(MessagesReceived, void());
238 238
239 void OnDefaultSessionStarted( 239 void OnDefaultSessionStarted(
240 blink::mojom::PresentationSessionInfoPtr session_info) override { 240 blink::mojom::PresentationSessionInfoPtr session_info) override {
241 OnDefaultSessionStarted(*session_info); 241 OnDefaultSessionStarted(*session_info);
242 } 242 }
243 MOCK_METHOD1(OnDefaultSessionStarted, 243 MOCK_METHOD1(OnDefaultSessionStarted,
244 void(const blink::mojom::PresentationSessionInfo& session_info)); 244 void(const blink::mojom::PresentationSessionInfo& session_info));
245 245
246 void OnReceiverConnectionAvailable( 246 void OnReceiverConnectionAvailable(
247 blink::mojom::PresentationSessionInfoPtr session_info) override { 247 blink::mojom::PresentationSessionInfoPtr session_info,
248 blink::mojom::PresentationConnectionPtr connection) override {
248 OnReceiverConnectionAvailable(*session_info); 249 OnReceiverConnectionAvailable(*session_info);
249 } 250 }
250 MOCK_METHOD1(OnReceiverConnectionAvailable, 251 MOCK_METHOD1(OnReceiverConnectionAvailable,
251 void(const blink::mojom::PresentationSessionInfo& session_info)); 252 void(const blink::mojom::PresentationSessionInfo& session_info));
252 253
253 std::vector<blink::mojom::SessionMessagePtr> messages_received_; 254 std::vector<blink::mojom::SessionMessagePtr> messages_received_;
254 }; 255 };
255 256
256 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { 257 class PresentationServiceImplTest : public RenderViewHostImplTestHarness {
257 public: 258 public:
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 mock_delegate_.set_screen_availability_listening_supported(false); 967 mock_delegate_.set_screen_availability_listening_supported(false);
967 base::RunLoop run_loop; 968 base::RunLoop run_loop;
968 EXPECT_CALL(mock_client_, 969 EXPECT_CALL(mock_client_,
969 OnScreenAvailabilityNotSupported(presentation_url1_)) 970 OnScreenAvailabilityNotSupported(presentation_url1_))
970 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 971 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
971 ListenForScreenAvailabilityAndWait(presentation_url1_, false); 972 ListenForScreenAvailabilityAndWait(presentation_url1_, false);
972 run_loop.Run(); 973 run_loop.Run();
973 } 974 }
974 975
975 } // namespace content 976 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698