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

Side by Side Diff: talk/app/webrtc/peerconnectioninterface_unittest.cc

Issue 1413983004: Reland of Adding the ability to create an RtpSender without a track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing merge issue. Created 5 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
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/peerconnectionproxy.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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 pc_->AddStream(reference_collection_->at(0)); 2030 pc_->AddStream(reference_collection_->at(0));
2031 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); 2031 EXPECT_TRUE(DoSetLocalDescription(desc_1.release()));
2032 auto senders = pc_->GetSenders(); 2032 auto senders = pc_->GetSenders();
2033 EXPECT_EQ(4u, senders.size()); 2033 EXPECT_EQ(4u, senders.size());
2034 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); 2034 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0]));
2035 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); 2035 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0]));
2036 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); 2036 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1]));
2037 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); 2037 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1]));
2038 2038
2039 // Remove an audio and video track. 2039 // Remove an audio and video track.
2040 pc_->RemoveStream(reference_collection_->at(0));
2040 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; 2041 rtc::scoped_ptr<SessionDescriptionInterface> desc_2;
2041 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); 2042 CreateSessionDescriptionAndReference(1, 1, desc_2.accept());
2043 pc_->AddStream(reference_collection_->at(0));
2042 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); 2044 EXPECT_TRUE(DoSetLocalDescription(desc_2.release()));
2043 senders = pc_->GetSenders(); 2045 senders = pc_->GetSenders();
2044 EXPECT_EQ(2u, senders.size()); 2046 EXPECT_EQ(2u, senders.size());
2045 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); 2047 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0]));
2046 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); 2048 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0]));
2047 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); 2049 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1]));
2048 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); 2050 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1]));
2049 } 2051 }
2050 2052
2051 // This tests that an RtpSender is created when the local description is set 2053 // This tests that an RtpSender is created when the local description is set
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 FakeConstraints updated_answer_c; 2327 FakeConstraints updated_answer_c;
2326 answer_c.SetMandatoryReceiveAudio(false); 2328 answer_c.SetMandatoryReceiveAudio(false);
2327 answer_c.SetMandatoryReceiveVideo(false); 2329 answer_c.SetMandatoryReceiveVideo(false);
2328 2330
2329 cricket::MediaSessionOptions updated_answer_options; 2331 cricket::MediaSessionOptions updated_answer_options;
2330 EXPECT_TRUE( 2332 EXPECT_TRUE(
2331 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); 2333 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options));
2332 EXPECT_TRUE(updated_answer_options.has_audio()); 2334 EXPECT_TRUE(updated_answer_options.has_audio());
2333 EXPECT_TRUE(updated_answer_options.has_video()); 2335 EXPECT_TRUE(updated_answer_options.has_video());
2334 } 2336 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/peerconnectionproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698