RTCIceCandidateStats.isRemote added and collected.
This was added to the spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-isremote BUG=webrtc:6756, chromium:632723, chromium:627816 Review-Url: https://codereview.webrtc.org/2595003003 Cr-Commit-Position: refs/heads/master@{#15863}
This commit is contained in:
@ -909,6 +909,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_a_local_host.protocol = "a_local_host's protocol";
|
||||
expected_a_local_host.candidate_type = "host";
|
||||
expected_a_local_host.priority = 0;
|
||||
EXPECT_FALSE(*expected_a_local_host.is_remote);
|
||||
|
||||
std::unique_ptr<cricket::Candidate> a_remote_srflx = CreateFakeCandidate(
|
||||
"6.7.8.9", 10,
|
||||
@ -922,6 +923,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_a_remote_srflx.protocol = "remote_srflx's protocol";
|
||||
expected_a_remote_srflx.candidate_type = "srflx";
|
||||
expected_a_remote_srflx.priority = 1;
|
||||
EXPECT_TRUE(*expected_a_remote_srflx.is_remote);
|
||||
|
||||
std::unique_ptr<cricket::Candidate> a_local_prflx = CreateFakeCandidate(
|
||||
"11.12.13.14", 15,
|
||||
@ -935,6 +937,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_a_local_prflx.protocol = "a_local_prflx's protocol";
|
||||
expected_a_local_prflx.candidate_type = "prflx";
|
||||
expected_a_local_prflx.priority = 2;
|
||||
EXPECT_FALSE(*expected_a_local_prflx.is_remote);
|
||||
|
||||
std::unique_ptr<cricket::Candidate> a_remote_relay = CreateFakeCandidate(
|
||||
"16.17.18.19", 20,
|
||||
@ -948,6 +951,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_a_remote_relay.protocol = "a_remote_relay's protocol";
|
||||
expected_a_remote_relay.candidate_type = "relay";
|
||||
expected_a_remote_relay.priority = 3;
|
||||
EXPECT_TRUE(*expected_a_remote_relay.is_remote);
|
||||
|
||||
// Candidates in the second transport stats.
|
||||
std::unique_ptr<cricket::Candidate> b_local = CreateFakeCandidate(
|
||||
@ -962,6 +966,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_b_local.protocol = "b_local's protocol";
|
||||
expected_b_local.candidate_type = "host";
|
||||
expected_b_local.priority = 42;
|
||||
EXPECT_FALSE(*expected_b_local.is_remote);
|
||||
|
||||
std::unique_ptr<cricket::Candidate> b_remote = CreateFakeCandidate(
|
||||
"42.42.42.42", 42,
|
||||
@ -975,6 +980,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
|
||||
expected_b_remote.protocol = "b_remote's protocol";
|
||||
expected_b_remote.candidate_type = "host";
|
||||
expected_b_remote.priority = 42;
|
||||
EXPECT_TRUE(*expected_b_remote.is_remote);
|
||||
|
||||
SessionStats session_stats;
|
||||
|
||||
@ -1108,6 +1114,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) {
|
||||
expected_local_candidate.protocol = "protocol";
|
||||
expected_local_candidate.candidate_type = "host";
|
||||
expected_local_candidate.priority = 42;
|
||||
EXPECT_FALSE(*expected_local_candidate.is_remote);
|
||||
ASSERT_TRUE(report->Get(expected_local_candidate.id()));
|
||||
EXPECT_EQ(expected_local_candidate,
|
||||
report->Get(expected_local_candidate.id())->cast_to<
|
||||
@ -1120,6 +1127,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) {
|
||||
expected_remote_candidate.protocol = "protocol";
|
||||
expected_remote_candidate.candidate_type = "host";
|
||||
expected_remote_candidate.priority = 42;
|
||||
EXPECT_TRUE(*expected_remote_candidate.is_remote);
|
||||
ASSERT_TRUE(report->Get(expected_remote_candidate.id()));
|
||||
EXPECT_EQ(expected_remote_candidate,
|
||||
report->Get(expected_remote_candidate.id())->cast_to<
|
||||
|
||||
Reference in New Issue
Block a user