Index: talk/app/webrtc/webrtcsdp_unittest.cc |
diff --git a/talk/app/webrtc/webrtcsdp_unittest.cc b/talk/app/webrtc/webrtcsdp_unittest.cc |
index 2bd6f6d668951d8d16f782142ef55e921ce47ed6..50ea8b0137b8bf4f8b8950f74c25e3da2a013f94 100644 |
--- a/talk/app/webrtc/webrtcsdp_unittest.cc |
+++ b/talk/app/webrtc/webrtcsdp_unittest.cc |
@@ -1698,12 +1698,7 @@ TEST_F(WebRtcSdpTest, SerializeSessionDescriptionWithDataChannelAndBandwidth) { |
std::string expected_sdp = kSdpString; |
expected_sdp.append(kSdpRtpDataChannelString); |
- // We want to test that serializing data content ignores bandwidth |
- // settings (it should always be the default). Thus, we don't do |
- // the following: |
- // TODO(pthatcher): We need to temporarily allow the SDP to control |
- // this for backwards-compatibility. Once we don't need that any |
- // more, remove this. |
+ // Serializing data content shouldn't ignore bandwidth settings. |
InjectAfter("m=application 9 RTP/SAVPF 101\r\nc=IN IP4 0.0.0.0\r\n", |
"b=AS:100\r\n", |
&expected_sdp); |
@@ -2261,12 +2256,10 @@ TEST_F(WebRtcSdpTest, DeserializeSdpWithSctpDataChannelAndNewPort) { |
TEST_F(WebRtcSdpTest, DeserializeSdpWithRtpDataChannelsAndBandwidth) { |
AddRtpDataChannel(); |
JsepSessionDescription jdesc(kDummyString); |
- // We want to test that deserializing data content ignores bandwidth |
- // settings (it should always be the default). Thus, we don't do |
- // the following: |
- // TODO(pthatcher): We need to temporarily allow the SDP to control |
- // this for backwards-compatibility. Once we don't need that any |
- // more, remove this. |
+ // We want to test that deserializing data content limits bandwidth |
+ // settings (it should never be greater than the default). |
+ // This should prevent someone from using unlimited data bandwidth through |
+ // JS and "breaking the Internet". |
DataContentDescription* dcd = static_cast<DataContentDescription*>( |
GetFirstDataContent(&desc_)->description); |
dcd->set_bandwidth(100 * 1000); |
@@ -2279,9 +2272,7 @@ TEST_F(WebRtcSdpTest, DeserializeSdpWithRtpDataChannelsAndBandwidth) { |
&sdp_with_bandwidth); |
JsepSessionDescription jdesc_with_bandwidth(kDummyString); |
- EXPECT_TRUE( |
- SdpDeserialize(sdp_with_bandwidth, &jdesc_with_bandwidth)); |
- EXPECT_TRUE(CompareSessionDescription(jdesc, jdesc_with_bandwidth)); |
+ EXPECT_FALSE(SdpDeserialize(sdp_with_bandwidth, &jdesc_with_bandwidth)); |
} |
TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithSessionLevelExtmap) { |