Reland "ice server parsing: return RTCError with more details"
This is a reland of commit c4b0bde7f2daabc4e0667fb73d096d1cf0819226 which changes the name of the new method and adds a deprecated backward compatible variant with the old name. Original change's description: > ice server parsing: return RTCError with more details > > surfacing those errors to the API (without specific details) instead of just the logging. > > BUG=webrtc:14539 > > Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340 > Reviewed-by: Henrik Boström <hbos@webrtc.org> > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > Commit-Queue: Philipp Hancke <phancke@microsoft.com> > Cr-Commit-Position: refs/heads/main@{#38356} Bug: webrtc:14539 Change-Id: I0a5482e123f25867582d62101b31ed207b95ea1a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278962 Commit-Queue: Philipp Hancke <phancke@microsoft.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38364}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
77ec9f5015
commit
633dc2fd10
@ -62,8 +62,9 @@ class IceServerParsingTest : public ::testing::Test {
|
||||
server.tls_cert_policy = tls_certificate_policy;
|
||||
server.hostname = hostname;
|
||||
servers.push_back(server);
|
||||
return webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_) ==
|
||||
webrtc::RTCErrorType::NONE;
|
||||
return webrtc::ParseIceServersOrError(servers, &stun_servers_,
|
||||
&turn_servers_)
|
||||
.ok();
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -229,8 +230,9 @@ TEST_F(IceServerParsingTest, ParseMultipleUrls) {
|
||||
server.username = "foo";
|
||||
server.password = "bar";
|
||||
servers.push_back(server);
|
||||
EXPECT_EQ(webrtc::RTCErrorType::NONE,
|
||||
webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_));
|
||||
EXPECT_TRUE(
|
||||
webrtc::ParseIceServersOrError(servers, &stun_servers_, &turn_servers_)
|
||||
.ok());
|
||||
EXPECT_EQ(1U, stun_servers_.size());
|
||||
EXPECT_EQ(1U, turn_servers_.size());
|
||||
}
|
||||
@ -245,8 +247,10 @@ TEST_F(IceServerParsingTest, TurnServerPrioritiesUnique) {
|
||||
server.username = "foo";
|
||||
server.password = "bar";
|
||||
servers.push_back(server);
|
||||
EXPECT_EQ(webrtc::RTCErrorType::NONE,
|
||||
webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_));
|
||||
|
||||
EXPECT_TRUE(
|
||||
webrtc::ParseIceServersOrError(servers, &stun_servers_, &turn_servers_)
|
||||
.ok());
|
||||
EXPECT_EQ(2U, turn_servers_.size());
|
||||
EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user