stats: add address as alias for ip
this was renamed in https://github.com/w3c/webrtc-pc/issues/1913 and https://github.com/w3c/webrtc-stats/pull/381 Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-address BUG=chromium:968203 Change-Id: If75849fe1dc87ada6850e7b64aa8569e13baf0d8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212681 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#33534}
This commit is contained in:

committed by
Commit Bot

parent
e2ac591c0d
commit
a9ba450339
@ -211,6 +211,7 @@ class RTC_EXPORT RTCIceCandidateStats : public RTCStats {
|
|||||||
RTCStatsMember<bool> is_remote;
|
RTCStatsMember<bool> is_remote;
|
||||||
RTCStatsMember<std::string> network_type;
|
RTCStatsMember<std::string> network_type;
|
||||||
RTCStatsMember<std::string> ip;
|
RTCStatsMember<std::string> ip;
|
||||||
|
RTCStatsMember<std::string> address;
|
||||||
RTCStatsMember<int32_t> port;
|
RTCStatsMember<int32_t> port;
|
||||||
RTCStatsMember<std::string> protocol;
|
RTCStatsMember<std::string> protocol;
|
||||||
RTCStatsMember<std::string> relay_protocol;
|
RTCStatsMember<std::string> relay_protocol;
|
||||||
|
@ -652,6 +652,7 @@ const std::string& ProduceIceCandidateStats(int64_t timestamp_us,
|
|||||||
RTC_DCHECK_EQ(rtc::ADAPTER_TYPE_UNKNOWN, candidate.network_type());
|
RTC_DCHECK_EQ(rtc::ADAPTER_TYPE_UNKNOWN, candidate.network_type());
|
||||||
}
|
}
|
||||||
candidate_stats->ip = candidate.address().ipaddr().ToString();
|
candidate_stats->ip = candidate.address().ipaddr().ToString();
|
||||||
|
candidate_stats->address = candidate.address().ipaddr().ToString();
|
||||||
candidate_stats->port = static_cast<int32_t>(candidate.address().port());
|
candidate_stats->port = static_cast<int32_t>(candidate.address().port());
|
||||||
candidate_stats->protocol = candidate.protocol();
|
candidate_stats->protocol = candidate.protocol();
|
||||||
candidate_stats->candidate_type =
|
candidate_stats->candidate_type =
|
||||||
|
@ -1083,6 +1083,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
expected_a_local_host.transport_id = "RTCTransport_a_0";
|
expected_a_local_host.transport_id = "RTCTransport_a_0";
|
||||||
expected_a_local_host.network_type = "vpn";
|
expected_a_local_host.network_type = "vpn";
|
||||||
expected_a_local_host.ip = "1.2.3.4";
|
expected_a_local_host.ip = "1.2.3.4";
|
||||||
|
expected_a_local_host.address = "1.2.3.4";
|
||||||
expected_a_local_host.port = 5;
|
expected_a_local_host.port = 5;
|
||||||
expected_a_local_host.protocol = "a_local_host's protocol";
|
expected_a_local_host.protocol = "a_local_host's protocol";
|
||||||
expected_a_local_host.candidate_type = "host";
|
expected_a_local_host.candidate_type = "host";
|
||||||
@ -1096,6 +1097,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
"RTCIceCandidate_" + a_remote_srflx->id(), 0);
|
"RTCIceCandidate_" + a_remote_srflx->id(), 0);
|
||||||
expected_a_remote_srflx.transport_id = "RTCTransport_a_0";
|
expected_a_remote_srflx.transport_id = "RTCTransport_a_0";
|
||||||
expected_a_remote_srflx.ip = "6.7.8.9";
|
expected_a_remote_srflx.ip = "6.7.8.9";
|
||||||
|
expected_a_remote_srflx.address = "6.7.8.9";
|
||||||
expected_a_remote_srflx.port = 10;
|
expected_a_remote_srflx.port = 10;
|
||||||
expected_a_remote_srflx.protocol = "remote_srflx's protocol";
|
expected_a_remote_srflx.protocol = "remote_srflx's protocol";
|
||||||
expected_a_remote_srflx.candidate_type = "srflx";
|
expected_a_remote_srflx.candidate_type = "srflx";
|
||||||
@ -1111,6 +1113,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
expected_a_local_prflx.transport_id = "RTCTransport_a_0";
|
expected_a_local_prflx.transport_id = "RTCTransport_a_0";
|
||||||
expected_a_local_prflx.network_type = "cellular";
|
expected_a_local_prflx.network_type = "cellular";
|
||||||
expected_a_local_prflx.ip = "11.12.13.14";
|
expected_a_local_prflx.ip = "11.12.13.14";
|
||||||
|
expected_a_local_prflx.address = "11.12.13.14";
|
||||||
expected_a_local_prflx.port = 15;
|
expected_a_local_prflx.port = 15;
|
||||||
expected_a_local_prflx.protocol = "a_local_prflx's protocol";
|
expected_a_local_prflx.protocol = "a_local_prflx's protocol";
|
||||||
expected_a_local_prflx.candidate_type = "prflx";
|
expected_a_local_prflx.candidate_type = "prflx";
|
||||||
@ -1125,6 +1128,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
"RTCIceCandidate_" + a_remote_relay->id(), 0);
|
"RTCIceCandidate_" + a_remote_relay->id(), 0);
|
||||||
expected_a_remote_relay.transport_id = "RTCTransport_a_0";
|
expected_a_remote_relay.transport_id = "RTCTransport_a_0";
|
||||||
expected_a_remote_relay.ip = "16.17.18.19";
|
expected_a_remote_relay.ip = "16.17.18.19";
|
||||||
|
expected_a_remote_relay.address = "16.17.18.19";
|
||||||
expected_a_remote_relay.port = 20;
|
expected_a_remote_relay.port = 20;
|
||||||
expected_a_remote_relay.protocol = "a_remote_relay's protocol";
|
expected_a_remote_relay.protocol = "a_remote_relay's protocol";
|
||||||
expected_a_remote_relay.candidate_type = "relay";
|
expected_a_remote_relay.candidate_type = "relay";
|
||||||
@ -1141,6 +1145,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
"RTCIceCandidate_" + a_local_relay->id(), 0);
|
"RTCIceCandidate_" + a_local_relay->id(), 0);
|
||||||
expected_a_local_relay.transport_id = "RTCTransport_a_0";
|
expected_a_local_relay.transport_id = "RTCTransport_a_0";
|
||||||
expected_a_local_relay.ip = "16.17.18.19";
|
expected_a_local_relay.ip = "16.17.18.19";
|
||||||
|
expected_a_local_relay.address = "16.17.18.19";
|
||||||
expected_a_local_relay.port = 21;
|
expected_a_local_relay.port = 21;
|
||||||
expected_a_local_relay.protocol = "a_local_relay's protocol";
|
expected_a_local_relay.protocol = "a_local_relay's protocol";
|
||||||
expected_a_local_relay.relay_protocol = "tcp";
|
expected_a_local_relay.relay_protocol = "tcp";
|
||||||
@ -1158,6 +1163,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
expected_b_local.transport_id = "RTCTransport_b_0";
|
expected_b_local.transport_id = "RTCTransport_b_0";
|
||||||
expected_b_local.network_type = "wifi";
|
expected_b_local.network_type = "wifi";
|
||||||
expected_b_local.ip = "42.42.42.42";
|
expected_b_local.ip = "42.42.42.42";
|
||||||
|
expected_b_local.address = "42.42.42.42";
|
||||||
expected_b_local.port = 42;
|
expected_b_local.port = 42;
|
||||||
expected_b_local.protocol = "b_local's protocol";
|
expected_b_local.protocol = "b_local's protocol";
|
||||||
expected_b_local.candidate_type = "host";
|
expected_b_local.candidate_type = "host";
|
||||||
@ -1172,6 +1178,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
|||||||
"RTCIceCandidate_" + b_remote->id(), 0);
|
"RTCIceCandidate_" + b_remote->id(), 0);
|
||||||
expected_b_remote.transport_id = "RTCTransport_b_0";
|
expected_b_remote.transport_id = "RTCTransport_b_0";
|
||||||
expected_b_remote.ip = "42.42.42.42";
|
expected_b_remote.ip = "42.42.42.42";
|
||||||
|
expected_b_remote.address = "42.42.42.42";
|
||||||
expected_b_remote.port = 42;
|
expected_b_remote.port = 42;
|
||||||
expected_b_remote.protocol = "b_remote's protocol";
|
expected_b_remote.protocol = "b_remote's protocol";
|
||||||
expected_b_remote.candidate_type = "host";
|
expected_b_remote.candidate_type = "host";
|
||||||
@ -1373,6 +1380,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) {
|
|||||||
expected_local_candidate.transport_id = *expected_pair.transport_id;
|
expected_local_candidate.transport_id = *expected_pair.transport_id;
|
||||||
expected_local_candidate.network_type = "wifi";
|
expected_local_candidate.network_type = "wifi";
|
||||||
expected_local_candidate.ip = "42.42.42.42";
|
expected_local_candidate.ip = "42.42.42.42";
|
||||||
|
expected_local_candidate.address = "42.42.42.42";
|
||||||
expected_local_candidate.port = 42;
|
expected_local_candidate.port = 42;
|
||||||
expected_local_candidate.protocol = "protocol";
|
expected_local_candidate.protocol = "protocol";
|
||||||
expected_local_candidate.candidate_type = "host";
|
expected_local_candidate.candidate_type = "host";
|
||||||
@ -1388,6 +1396,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) {
|
|||||||
*expected_pair.remote_candidate_id, report->timestamp_us());
|
*expected_pair.remote_candidate_id, report->timestamp_us());
|
||||||
expected_remote_candidate.transport_id = *expected_pair.transport_id;
|
expected_remote_candidate.transport_id = *expected_pair.transport_id;
|
||||||
expected_remote_candidate.ip = "42.42.42.42";
|
expected_remote_candidate.ip = "42.42.42.42";
|
||||||
|
expected_remote_candidate.address = "42.42.42.42";
|
||||||
expected_remote_candidate.port = 42;
|
expected_remote_candidate.port = 42;
|
||||||
expected_remote_candidate.protocol = "protocol";
|
expected_remote_candidate.protocol = "protocol";
|
||||||
expected_remote_candidate.candidate_type = "host";
|
expected_remote_candidate.candidate_type = "host";
|
||||||
|
@ -528,6 +528,7 @@ class RTCStatsReportVerifier {
|
|||||||
verifier.TestMemberIsDefined(candidate.network_type);
|
verifier.TestMemberIsDefined(candidate.network_type);
|
||||||
}
|
}
|
||||||
verifier.TestMemberIsDefined(candidate.ip);
|
verifier.TestMemberIsDefined(candidate.ip);
|
||||||
|
verifier.TestMemberIsDefined(candidate.address);
|
||||||
verifier.TestMemberIsNonNegative<int32_t>(candidate.port);
|
verifier.TestMemberIsNonNegative<int32_t>(candidate.port);
|
||||||
verifier.TestMemberIsDefined(candidate.protocol);
|
verifier.TestMemberIsDefined(candidate.protocol);
|
||||||
verifier.TestMemberIsDefined(candidate.candidate_type);
|
verifier.TestMemberIsDefined(candidate.candidate_type);
|
||||||
|
@ -259,6 +259,7 @@ WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate",
|
|||||||
&is_remote,
|
&is_remote,
|
||||||
&network_type,
|
&network_type,
|
||||||
&ip,
|
&ip,
|
||||||
|
&address,
|
||||||
&port,
|
&port,
|
||||||
&protocol,
|
&protocol,
|
||||||
&relay_protocol,
|
&relay_protocol,
|
||||||
@ -281,6 +282,7 @@ RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id,
|
|||||||
is_remote("isRemote", is_remote),
|
is_remote("isRemote", is_remote),
|
||||||
network_type("networkType"),
|
network_type("networkType"),
|
||||||
ip("ip"),
|
ip("ip"),
|
||||||
|
address("address"),
|
||||||
port("port"),
|
port("port"),
|
||||||
protocol("protocol"),
|
protocol("protocol"),
|
||||||
relay_protocol("relayProtocol"),
|
relay_protocol("relayProtocol"),
|
||||||
@ -295,6 +297,7 @@ RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other)
|
|||||||
is_remote(other.is_remote),
|
is_remote(other.is_remote),
|
||||||
network_type(other.network_type),
|
network_type(other.network_type),
|
||||||
ip(other.ip),
|
ip(other.ip),
|
||||||
|
address(other.address),
|
||||||
port(other.port),
|
port(other.port),
|
||||||
protocol(other.protocol),
|
protocol(other.protocol),
|
||||||
relay_protocol(other.relay_protocol),
|
relay_protocol(other.relay_protocol),
|
||||||
|
Reference in New Issue
Block a user