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

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

Issue 2340433003: [Presentation API] 1-UA: notify receiver page when receiver connection becomes available (blink sid… (Closed)
Patch Set: resolve code review comments from dcheng Created 4 years, 2 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
« no previous file with comments | « no previous file | content/renderer/presentation/presentation_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 MOCK_METHOD0(MessagesReceived, void()); 191 MOCK_METHOD0(MessagesReceived, void());
192 192
193 void OnDefaultSessionStarted( 193 void OnDefaultSessionStarted(
194 blink::mojom::PresentationSessionInfoPtr session_info) override { 194 blink::mojom::PresentationSessionInfoPtr session_info) override {
195 OnDefaultSessionStarted(*session_info); 195 OnDefaultSessionStarted(*session_info);
196 } 196 }
197 MOCK_METHOD1(OnDefaultSessionStarted, 197 MOCK_METHOD1(OnDefaultSessionStarted,
198 void(const blink::mojom::PresentationSessionInfo& session_info)); 198 void(const blink::mojom::PresentationSessionInfo& session_info));
199 199
200 void OnReceiverConnectionAvailable(
201 blink::mojom::PresentationSessionInfoPtr session_info) override {
202 OnReceiverConnectionAvailable(*session_info);
203 }
204 MOCK_METHOD1(OnReceiverConnectionAvailable,
205 void(const blink::mojom::PresentationSessionInfo& session_info));
206
200 std::vector<blink::mojom::SessionMessagePtr> messages_received_; 207 std::vector<blink::mojom::SessionMessagePtr> messages_received_;
201 }; 208 };
202 209
203 class PresentationServiceImplTest : public RenderViewHostImplTestHarness { 210 class PresentationServiceImplTest : public RenderViewHostImplTestHarness {
204 public: 211 public:
205 PresentationServiceImplTest() {} 212 PresentationServiceImplTest() {}
206 213
207 void SetUp() override { 214 void SetUp() override {
208 RenderViewHostImplTestHarness::SetUp(); 215 RenderViewHostImplTestHarness::SetUp();
209 216
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 mock_delegate_.set_screen_availability_listening_supported(false); 857 mock_delegate_.set_screen_availability_listening_supported(false);
851 GURL url(kPresentationUrl1); 858 GURL url(kPresentationUrl1);
852 base::RunLoop run_loop; 859 base::RunLoop run_loop;
853 EXPECT_CALL(mock_client_, OnScreenAvailabilityNotSupported(url)) 860 EXPECT_CALL(mock_client_, OnScreenAvailabilityNotSupported(url))
854 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 861 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
855 ListenForScreenAvailabilityAndWait(kPresentationUrl1, false); 862 ListenForScreenAvailabilityAndWait(kPresentationUrl1, false);
856 run_loop.Run(); 863 run_loop.Run();
857 } 864 }
858 865
859 } // namespace content 866 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/presentation/presentation_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698