Chromium Code Reviews| 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 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1941 pc_->AddStream(reference_collection_->at(0)); | 1941 pc_->AddStream(reference_collection_->at(0)); |
| 1942 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); | 1942 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); |
| 1943 auto senders = pc_->GetSenders(); | 1943 auto senders = pc_->GetSenders(); |
| 1944 EXPECT_EQ(4u, senders.size()); | 1944 EXPECT_EQ(4u, senders.size()); |
| 1945 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 1945 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
| 1946 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 1946 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
| 1947 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); | 1947 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); |
| 1948 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); | 1948 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); |
| 1949 | 1949 |
| 1950 // Remove an audio and video track. | 1950 // Remove an audio and video track. |
| 1951 pc_->RemoveStream(reference_collection_->at(0)); | |
| 1951 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; | 1952 rtc::scoped_ptr<SessionDescriptionInterface> desc_2; |
| 1952 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); | 1953 CreateSessionDescriptionAndReference(1, 1, desc_2.accept()); |
| 1954 pc_->AddStream(reference_collection_->at(0)); | |
|
pthatcher1
2015/10/20 17:42:49
Was this test wrong before?
Taylor Brandstetter
2015/10/21 00:22:08
No, there's an intentional change in behavior. Pre
| |
| 1953 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); | 1955 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); |
| 1954 senders = pc_->GetSenders(); | 1956 senders = pc_->GetSenders(); |
| 1955 EXPECT_EQ(2u, senders.size()); | 1957 EXPECT_EQ(2u, senders.size()); |
| 1956 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 1958 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
| 1957 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 1959 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
| 1958 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); | 1960 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); |
| 1959 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); | 1961 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); |
| 1960 } | 1962 } |
| 1961 | 1963 |
| 1962 // This tests that an RtpSender is created when the local description is set | 1964 // This tests that an RtpSender is created when the local description is set |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2242 EXPECT_TRUE(updated_answer_options.has_video()); | 2244 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2243 | 2245 |
| 2244 RTCOfferAnswerOptions default_rtc_options; | 2246 RTCOfferAnswerOptions default_rtc_options; |
| 2245 EXPECT_TRUE( | 2247 EXPECT_TRUE( |
| 2246 ConvertRtcOptionsForOffer(default_rtc_options, &updated_offer_options)); | 2248 ConvertRtcOptionsForOffer(default_rtc_options, &updated_offer_options)); |
| 2247 // By default, |has_audio| or |has_video| are false if there is no media | 2249 // By default, |has_audio| or |has_video| are false if there is no media |
| 2248 // track. | 2250 // track. |
| 2249 EXPECT_FALSE(updated_offer_options.has_audio()); | 2251 EXPECT_FALSE(updated_offer_options.has_audio()); |
| 2250 EXPECT_FALSE(updated_offer_options.has_video()); | 2252 EXPECT_FALSE(updated_offer_options.has_video()); |
| 2251 } | 2253 } |
| OLD | NEW |