OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 3406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3417 JsepSessionDescription jdesc_output(kDummyString); | 3417 JsepSessionDescription jdesc_output(kDummyString); |
3418 EXPECT_TRUE( | 3418 EXPECT_TRUE( |
3419 SdpDeserialize(kSdpWithIceCredentialsInCandidateString, &jdesc_output)); | 3419 SdpDeserialize(kSdpWithIceCredentialsInCandidateString, &jdesc_output)); |
3420 const IceCandidateCollection* candidates = jdesc_output.candidates(0); | 3420 const IceCandidateCollection* candidates = jdesc_output.candidates(0); |
3421 ASSERT_NE(nullptr, candidates); | 3421 ASSERT_NE(nullptr, candidates); |
3422 ASSERT_EQ(1, candidates->count()); | 3422 ASSERT_EQ(1, candidates->count()); |
3423 cricket::Candidate c = candidates->at(0)->candidate(); | 3423 cricket::Candidate c = candidates->at(0)->candidate(); |
3424 EXPECT_EQ("ufrag_voice", c.username()); | 3424 EXPECT_EQ("ufrag_voice", c.username()); |
3425 EXPECT_EQ("pwd_voice", c.password()); | 3425 EXPECT_EQ("pwd_voice", c.password()); |
3426 } | 3426 } |
3427 | |
3428 // Test that "a=msid" with a missing track ID is rejected and doesn't crash. | |
3429 // Regression test for: | |
3430 // https://bugs.chromium.org/p/chromium/issues/detail?id=686405 | |
pthatcher1
2017/02/10 18:14:30
Do we need a test for a missing stream id?
Taylor Brandstetter
2017/02/10 18:29:12
Sure, why not.
| |
3431 TEST_F(WebRtcSdpTest, DeserializeMsidAttributeWithMissingTrackId) { | |
3432 static const char kSdpWithMissingTrackId[] = | |
3433 "v=0\r\n" | |
3434 "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" | |
3435 "s=-\r\n" | |
3436 "t=0 0\r\n" | |
3437 "m=audio 9 RTP/SAVPF 111\r\n" | |
3438 "c=IN IP4 0.0.0.0\r\n" | |
3439 "a=rtpmap:111 opus/48000/2\r\n" | |
3440 "a=msid:stream_id \r\n"; | |
3441 | |
3442 JsepSessionDescription jdesc_output(kDummyString); | |
3443 EXPECT_FALSE( | |
3444 SdpDeserialize(kSdpWithMissingTrackId, &jdesc_output)); | |
3445 } | |
OLD | NEW |