Make RTCStatsReport::ToString() return JSON-parseable string. BUG=chromium:653087 Review-Url: https://codereview.webrtc.org/2983243002 Cr-Commit-Position: refs/heads/master@{#19180}
diff --git a/webrtc/pc/rtcstats_integrationtest.cc b/webrtc/pc/rtcstats_integrationtest.cc index 47fa0e3..56a4ef1 100644 --- a/webrtc/pc/rtcstats_integrationtest.cc +++ b/webrtc/pc/rtcstats_integrationtest.cc
@@ -336,7 +336,7 @@ } EXPECT_TRUE(verify_successful) << "One or more problems with the stats. This is the report:\n" << - report_->ToString(); + report_->ToJson(); } bool VerifyRTCCertificateStats(
diff --git a/webrtc/pc/rtcstatscollector_unittest.cc b/webrtc/pc/rtcstatscollector_unittest.cc index 92024ad..8dc4a97 100644 --- a/webrtc/pc/rtcstatscollector_unittest.cc +++ b/webrtc/pc/rtcstatscollector_unittest.cc
@@ -54,51 +54,51 @@ // These are used by gtest code, such as if |EXPECT_EQ| fails. void PrintTo(const RTCCertificateStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCCodecStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCDataChannelStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCIceCandidatePairStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCLocalIceCandidateStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCRemoteIceCandidateStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCPeerConnectionStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCMediaStreamStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCMediaStreamTrackStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCInboundRTPStreamStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCOutboundRTPStreamStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } void PrintTo(const RTCTransportStats& stats, ::std::ostream* os) { - *os << stats.ToString(); + *os << stats.ToJson(); } namespace {