Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: webrtc/api/rtcstatscollector_unittest.cc

Issue 2593503003: RTCStatsReport::AddStats DCHECKs that the ID is unique. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/rtcstatscollector.cc ('k') | webrtc/api/stats/rtcstatsreport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcstatscollector_unittest.cc
diff --git a/webrtc/api/rtcstatscollector_unittest.cc b/webrtc/api/rtcstatscollector_unittest.cc
index 4be7491724010ec0ae85d396f57698f2fed42039..8941818fe9680df7d65e6aeccb6afd6b415b0dc7 100644
--- a/webrtc/api/rtcstatscollector_unittest.cc
+++ b/webrtc/api/rtcstatscollector_unittest.cc
@@ -969,6 +969,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
*a_local_prflx.get();
a_transport_channel_stats.connection_infos[1].remote_candidate =
*a_remote_relay.get();
+ session_stats.transport_stats["a"].transport_name = "a";
session_stats.transport_stats["a"].channel_stats.push_back(
a_transport_channel_stats);
@@ -979,6 +980,7 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) {
*b_local.get();
b_transport_channel_stats.connection_infos[0].remote_candidate =
*b_remote.get();
+ session_stats.transport_stats["b"].transport_name = "b";
session_stats.transport_stats["b"].channel_stats.push_back(
b_transport_channel_stats);
@@ -1164,7 +1166,7 @@ TEST_F(RTCStatsCollectorTest,
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsReport();
RTCMediaStreamStats expected_local_stream(
- "RTCMediaStream_LocalStreamLabel", report->timestamp_us());
+ "RTCMediaStream_local_LocalStreamLabel", report->timestamp_us());
expected_local_stream.stream_identifier = local_stream->label();
expected_local_stream.track_ids = std::vector<std::string>();
expected_local_stream.track_ids->push_back(
@@ -1175,7 +1177,7 @@ TEST_F(RTCStatsCollectorTest,
RTCMediaStreamStats>());
RTCMediaStreamStats expected_remote_stream(
- "RTCMediaStream_RemoteStreamLabel", report->timestamp_us());
+ "RTCMediaStream_remote_RemoteStreamLabel", report->timestamp_us());
expected_remote_stream.stream_identifier = remote_stream->label();
expected_remote_stream.track_ids = std::vector<std::string>();
expected_remote_stream.track_ids->push_back(
@@ -1301,7 +1303,7 @@ TEST_F(RTCStatsCollectorTest,
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsReport();
RTCMediaStreamStats expected_local_stream(
- "RTCMediaStream_LocalStreamLabel", report->timestamp_us());
+ "RTCMediaStream_local_LocalStreamLabel", report->timestamp_us());
expected_local_stream.stream_identifier = local_stream->label();
expected_local_stream.track_ids = std::vector<std::string>();
expected_local_stream.track_ids->push_back(
@@ -1312,7 +1314,7 @@ TEST_F(RTCStatsCollectorTest,
RTCMediaStreamStats>());
RTCMediaStreamStats expected_remote_stream(
- "RTCMediaStream_RemoteStreamLabel", report->timestamp_us());
+ "RTCMediaStream_remote_RemoteStreamLabel", report->timestamp_us());
expected_remote_stream.stream_identifier = remote_stream->label();
expected_remote_stream.track_ids = std::vector<std::string>();
expected_remote_stream.track_ids->push_back(
« no previous file with comments | « webrtc/api/rtcstatscollector.cc ('k') | webrtc/api/stats/rtcstatsreport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698