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

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

Issue 1426443007: Revert of Adding the ability to create an RtpSender without a track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 pc_->AddStream(reference_collection_->at(0)); 2013 pc_->AddStream(reference_collection_->at(0));
2014 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); 2014 EXPECT_TRUE(DoSetLocalDescription(desc_1.release()));
2015 auto senders = pc_->GetSenders(); 2015 auto senders = pc_->GetSenders();
2016 EXPECT_EQ(4u, senders.size()); 2016 EXPECT_EQ(4u, senders.size());
2017 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); 2017 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0]));
2018 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); 2018 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0]));
2019 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); 2019 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1]));
2020 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); 2020 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1]));
2021 2021
2022 // Remove an audio and video track. 2022 // Remove an audio and video track.
2023 pc_->RemoveStream(reference_collection_->at(0));
2024 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; 2023 rtc::scoped_ptr<SessionDescriptionInterface> desc_2;
2025 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); 2024 CreateSessionDescriptionAndReference(1, 1, desc_2.accept());
2026 pc_->AddStream(reference_collection_->at(0));
2027 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); 2025 EXPECT_TRUE(DoSetLocalDescription(desc_2.release()));
2028 senders = pc_->GetSenders(); 2026 senders = pc_->GetSenders();
2029 EXPECT_EQ(2u, senders.size()); 2027 EXPECT_EQ(2u, senders.size());
2030 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); 2028 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0]));
2031 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); 2029 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0]));
2032 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); 2030 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1]));
2033 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); 2031 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1]));
2034 } 2032 }
2035 2033
2036 // This tests that an RtpSender is created when the local description is set 2034 // 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
2310 FakeConstraints updated_answer_c; 2308 FakeConstraints updated_answer_c;
2311 answer_c.SetMandatoryReceiveAudio(false); 2309 answer_c.SetMandatoryReceiveAudio(false);
2312 answer_c.SetMandatoryReceiveVideo(false); 2310 answer_c.SetMandatoryReceiveVideo(false);
2313 2311
2314 cricket::MediaSessionOptions updated_answer_options; 2312 cricket::MediaSessionOptions updated_answer_options;
2315 EXPECT_TRUE( 2313 EXPECT_TRUE(
2316 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); 2314 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options));
2317 EXPECT_TRUE(updated_answer_options.has_audio()); 2315 EXPECT_TRUE(updated_answer_options.has_audio());
2318 EXPECT_TRUE(updated_answer_options.has_video()); 2316 EXPECT_TRUE(updated_answer_options.has_video());
2319 } 2317 }
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