Collecting RTCIceCandidatePairStats.transport_id and improved unittests.
RTCIceCandidatePairStats.transport_id is set to the related
RTCTransportStats' id.
Unittest for RTCIceCandidatePairStats is updated to do EXPECT_EQ
between actual and an expected hardcoded dictionary. The previous way of
testing, ExpectReportContainsCandidatePair, is removed.
(ExpectReportContainsCandidate still exist, we might want to replace
this by EXPECT_EQ testing in a follow up.)
Unittest for RTCTransportStats is similarly updated and
ExpectReportContainsTransportStats is removed. A bug was uncovered where
the "rtcp_connection_info.best_connection = true" case was not tested
(a copy of rtcp_connection_info was used in the test, modifying that had
no affect on the test) - fixed.
rtcstats_integrationtest.cc updated to take transport_id into account.
In order to reuse an updated version of expected_rt[c]p_transport in the
unittest, timestamps are ignored by RTCStats::operator==.
BUG=chromium:627816, chromium:653873, chromium:653873, webrtc:6755
Review-Url: https://codereview.webrtc.org/2527113002
Cr-Commit-Position: refs/heads/master@{#15316}
diff --git a/webrtc/api/rtcstats_integrationtest.cc b/webrtc/api/rtcstats_integrationtest.cc
index a74d19f..a20f5b4 100644
--- a/webrtc/api/rtcstats_integrationtest.cc
+++ b/webrtc/api/rtcstats_integrationtest.cc
@@ -321,7 +321,8 @@
bool VerifyRTCIceCandidatePairStats(
const RTCIceCandidatePairStats& candidate_pair) {
RTCStatsVerifier verifier(report_, &candidate_pair);
- verifier.TestMemberIsUndefined(candidate_pair.transport_id);
+ verifier.TestMemberIsIDReference(
+ candidate_pair.transport_id, RTCTransportStats::kType);
verifier.TestMemberIsIDReference(
candidate_pair.local_candidate_id, RTCLocalIceCandidateStats::kType);
verifier.TestMemberIsIDReference(