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

Side by Side Diff: webrtc/pc/peerconnection_integrationtest.cc

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Try to fix the build failure on the bots. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after
2748 caller()->CreateAndSetAndSignalOffer(); 2748 caller()->CreateAndSetAndSignalOffer();
2749 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); 2749 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
2750 2750
2751 // Verify frames are still received end-to-end. 2751 // Verify frames are still received end-to-end.
2752 ExpectNewFramesReceivedWithWait( 2752 ExpectNewFramesReceivedWithWait(
2753 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, 2753 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount,
2754 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, 2754 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount,
2755 kMaxWaitForFramesMs); 2755 kMaxWaitForFramesMs);
2756 } 2756 }
2757 2757
2758 TEST_F(PeerConnectionIntegrationTest, GetContributingSources) {
2759 ASSERT_TRUE(CreatePeerConnectionWrappers());
2760 ConnectFakeSignaling();
2761 caller()->AddAudioVideoMediaStream();
2762 callee()->AddAudioVideoMediaStream();
2763 caller()->CreateAndSetAndSignalOffer();
2764 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
2765 ExpectNewFramesReceivedWithWait(
2766 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount,
2767 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount,
2768 kMaxWaitForFramesMs);
2769 ASSERT_GT(callee()->pc()->GetReceivers().size(), 0u);
2770 auto receiver = callee()->pc()->GetReceivers()[0];
2771 ASSERT_EQ(receiver->media_type(), cricket::MEDIA_TYPE_AUDIO);
2772
2773 auto contributing_sources = receiver->GetContributingSources();
2774 ASSERT_GT(receiver->GetParameters().encodings.size(), 0u);
2775 EXPECT_EQ(receiver->GetParameters().encodings[0].ssrc,
2776 contributing_sources[0].source());
2777 EXPECT_EQ(receiver->GetParameters().encodings[0].ssrc,
2778 contributing_sources[0].ssrc());
2779 }
2780
2758 } // namespace 2781 } // namespace
2759 2782
2760 #endif // if !defined(THREAD_SANITIZER) 2783 #endif // if !defined(THREAD_SANITIZER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698