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

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: call OPM.unregisterOPMController() in PresentationFrame::Reset() 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl.cc ('k') | content/renderer/presentation/presentation_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698