Index: webrtc/pc/rtptransport_unittest.cc |
diff --git a/webrtc/pc/rtptransport_unittest.cc b/webrtc/pc/rtptransport_unittest.cc |
index 27c77abcb51578ba9fba51b0fd1363c19722ddd0..4f2569042c4b8047a0a747b6f65bc42b401b871f 100644 |
--- a/webrtc/pc/rtptransport_unittest.cc |
+++ b/webrtc/pc/rtptransport_unittest.cc |
@@ -22,23 +22,32 @@ constexpr bool kMuxEnabled = true; |
TEST(RtpTransportTest, SetRtcpParametersCantDisableRtcpMux) { |
RtpTransport transport(kMuxDisabled); |
- RtcpParameters params; |
- transport.SetRtcpParameters(params); |
- params.mux = false; |
- EXPECT_FALSE(transport.SetRtcpParameters(params).ok()); |
+ RtpTransportParameters params; |
+ transport.SetParameters(params); |
+ params.rtcp.mux = false; |
+ EXPECT_FALSE(transport.SetParameters(params).ok()); |
} |
TEST(RtpTransportTest, SetRtcpParametersEmptyCnameUsesExisting) { |
static const char kName[] = "name"; |
RtpTransport transport(kMuxDisabled); |
- RtcpParameters params_with_name; |
- params_with_name.cname = kName; |
- transport.SetRtcpParameters(params_with_name); |
- EXPECT_EQ(transport.GetRtcpParameters().cname, kName); |
- |
- RtcpParameters params_without_name; |
- transport.SetRtcpParameters(params_without_name); |
- EXPECT_EQ(transport.GetRtcpParameters().cname, kName); |
+ RtpTransportParameters params_with_name; |
+ params_with_name.rtcp.cname = kName; |
+ transport.SetParameters(params_with_name); |
+ EXPECT_EQ(transport.GetParameters().rtcp.cname, kName); |
+ |
+ RtpTransportParameters params_without_name; |
+ transport.SetParameters(params_without_name); |
+ EXPECT_EQ(transport.GetParameters().rtcp.cname, kName); |
+} |
+ |
+TEST(RtpTransportTest, SetRtpTransportKeepAliveNotSupported) { |
Taylor Brandstetter
2017/08/03 01:18:04
Can you add a comment explaining that this is a li
sprang_webrtc
2017/08/03 13:08:14
Done.
|
+ RtpTransport transport(kMuxDisabled); |
+ RtpTransportParameters params; |
+ params.keepalive.timeout_interval_ms = 1; |
+ auto result = transport.SetParameters(params); |
+ EXPECT_FALSE(result.ok()); |
+ EXPECT_EQ(RTCErrorType::INVALID_MODIFICATION, result.type()); |
} |
class SignalObserver : public sigslot::has_slots<> { |