| OLD | NEW |
| 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 Loading... |
| 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)); |
| 2023 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; | 2024 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; |
| 2024 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); | 2025 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); |
| 2026 pc_->AddStream(reference_collection_->at(0)); |
| 2025 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); | 2027 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); |
| 2026 senders = pc_->GetSenders(); | 2028 senders = pc_->GetSenders(); |
| 2027 EXPECT_EQ(2u, senders.size()); | 2029 EXPECT_EQ(2u, senders.size()); |
| 2028 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 2030 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
| 2029 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 2031 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
| 2030 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); | 2032 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); |
| 2031 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); | 2033 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); |
| 2032 } | 2034 } |
| 2033 | 2035 |
| 2034 // This tests that an RtpSender is created when the local description is set | 2036 // 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 Loading... |
| 2308 FakeConstraints updated_answer_c; | 2310 FakeConstraints updated_answer_c; |
| 2309 answer_c.SetMandatoryReceiveAudio(false); | 2311 answer_c.SetMandatoryReceiveAudio(false); |
| 2310 answer_c.SetMandatoryReceiveVideo(false); | 2312 answer_c.SetMandatoryReceiveVideo(false); |
| 2311 | 2313 |
| 2312 cricket::MediaSessionOptions updated_answer_options; | 2314 cricket::MediaSessionOptions updated_answer_options; |
| 2313 EXPECT_TRUE( | 2315 EXPECT_TRUE( |
| 2314 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2316 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
| 2315 EXPECT_TRUE(updated_answer_options.has_audio()); | 2317 EXPECT_TRUE(updated_answer_options.has_audio()); |
| 2316 EXPECT_TRUE(updated_answer_options.has_video()); | 2318 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2317 } | 2319 } |
| OLD | NEW |