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

Side by Side Diff: webrtc/api/webrtcsdp_unittest.cc

Issue 1888373002: Don't write spaces after semicolons in FMTP lines. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed a space in an objc test expectation Created 4 years, 8 months 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 | « webrtc/api/webrtcsdp.cc ('k') | no next file » | 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 * 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 // TODO(hta): Check if payload type |pt| occurs in the m=video line. 2107 // TODO(hta): Check if payload type |pt| occurs in the m=video line.
2108 std::string to_find = "a=fmtp:" + pt + " "; 2108 std::string to_find = "a=fmtp:" + pt + " ";
2109 size_t fmtp_pos = message.find(to_find); 2109 size_t fmtp_pos = message.find(to_find);
2110 ASSERT_NE(std::string::npos, fmtp_pos) << "Failed to find " << to_find; 2110 ASSERT_NE(std::string::npos, fmtp_pos) << "Failed to find " << to_find;
2111 size_t fmtp_endpos = message.find("\n", fmtp_pos); 2111 size_t fmtp_endpos = message.find("\n", fmtp_pos);
2112 ASSERT_NE(std::string::npos, fmtp_endpos); 2112 ASSERT_NE(std::string::npos, fmtp_endpos);
2113 std::string fmtp_value = message.substr(fmtp_pos, fmtp_endpos); 2113 std::string fmtp_value = message.substr(fmtp_pos, fmtp_endpos);
2114 EXPECT_NE(std::string::npos, fmtp_value.find("level-asymmetry-allowed=1")); 2114 EXPECT_NE(std::string::npos, fmtp_value.find("level-asymmetry-allowed=1"));
2115 EXPECT_NE(std::string::npos, fmtp_value.find("packetization-mode=1")); 2115 EXPECT_NE(std::string::npos, fmtp_value.find("packetization-mode=1"));
2116 EXPECT_NE(std::string::npos, fmtp_value.find("profile-level-id=42e01f")); 2116 EXPECT_NE(std::string::npos, fmtp_value.find("profile-level-id=42e01f"));
2117 // Check that there are no spaces after semicolons.
2118 // https://bugs.webrtc.org/5793
2119 EXPECT_EQ(std::string::npos, fmtp_value.find("; "));
2117 } 2120 }
2118 2121
2119 TEST_F(WebRtcSdpTest, DeserializeSessionDescription) { 2122 TEST_F(WebRtcSdpTest, DeserializeSessionDescription) {
2120 JsepSessionDescription jdesc(kDummyString); 2123 JsepSessionDescription jdesc(kDummyString);
2121 // Deserialize 2124 // Deserialize
2122 EXPECT_TRUE(SdpDeserialize(kSdpFullString, &jdesc)); 2125 EXPECT_TRUE(SdpDeserialize(kSdpFullString, &jdesc));
2123 // Verify 2126 // Verify
2124 EXPECT_TRUE(CompareSessionDescription(jdesc_, jdesc)); 2127 EXPECT_TRUE(CompareSessionDescription(jdesc_, jdesc));
2125 } 2128 }
2126 2129
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 EXPECT_TRUE( 3144 EXPECT_TRUE(
3142 SdpDeserialize(kUnifiedPlanSdpFullString, &deserialized_description)); 3145 SdpDeserialize(kUnifiedPlanSdpFullString, &deserialized_description));
3143 3146
3144 EXPECT_TRUE(CompareSessionDescription(jdesc_, deserialized_description)); 3147 EXPECT_TRUE(CompareSessionDescription(jdesc_, deserialized_description));
3145 } 3148 }
3146 3149
3147 TEST_F(WebRtcSdpTest, SerializeUnifiedPlanSessionDescription) { 3150 TEST_F(WebRtcSdpTest, SerializeUnifiedPlanSessionDescription) {
3148 MakeUnifiedPlanDescription(); 3151 MakeUnifiedPlanDescription();
3149 TestSerialize(jdesc_, true); 3152 TestSerialize(jdesc_, true);
3150 } 3153 }
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsdp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698