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

Unified Diff: webrtc/pc/rtptransport_unittest.cc

Issue 2981513002: Wire up RTP keep-alive in ortc api. (Closed)
Patch Set: deps, again Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/rtptransport.cc ('k') | webrtc/pc/srtptransport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtptransport_unittest.cc
diff --git a/webrtc/pc/rtptransport_unittest.cc b/webrtc/pc/rtptransport_unittest.cc
index 27c77abcb51578ba9fba51b0fd1363c19722ddd0..0ed77ee463fee816cf9bf2d3c8cf63b0a8d34dfc 100644
--- a/webrtc/pc/rtptransport_unittest.cc
+++ b/webrtc/pc/rtptransport_unittest.cc
@@ -22,23 +22,34 @@ 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) {
+ // Tests that we warn users that keep-alive isn't supported yet.
+ // TODO(sprang): Wire up keep-alive and remove this test.
+ 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<> {
« no previous file with comments | « webrtc/pc/rtptransport.cc ('k') | webrtc/pc/srtptransport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698