Add test-only group id.

Bug: chromium:943076
Change-Id: Ife855fe59fe5e358bc94e4bb0da704ee2647dbd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129900
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27356}
This commit is contained in:
Jakob Ivarsson 2019-03-27 10:17:31 +01:00 committed by Commit Bot
parent e8964903a9
commit aa023e2553
2 changed files with 3 additions and 1 deletions

View file

@ -184,6 +184,8 @@ class RTC_EXPORT RTCStats {
// determine if a stats member should be exposed or not. Multiple non-standard // determine if a stats member should be exposed or not. Multiple non-standard
// stats members can share the same group ID so that they are exposed together. // stats members can share the same group ID so that they are exposed together.
enum class NonStandardGroupId { enum class NonStandardGroupId {
// Group ID used for testing purposes only.
kGroupIdForTesting,
// I2E: // I2E:
// https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hE2B1iItPDk // https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hE2B1iItPDk
kRtcAudioJitterBufferMaxPackets, kRtcAudioJitterBufferMaxPackets,

View file

@ -340,7 +340,7 @@ TEST(RTCStatsTest, IsStandardized) {
} }
TEST(RTCStatsTest, NonStandardGroupId) { TEST(RTCStatsTest, NonStandardGroupId) {
auto group_id = NonStandardGroupId::kRtcAudioJitterBufferMaxPackets; auto group_id = NonStandardGroupId::kGroupIdForTesting;
RTCNonStandardStatsMember<int32_t> with_group_id("stat", {group_id}); RTCNonStandardStatsMember<int32_t> with_group_id("stat", {group_id});
std::vector<NonStandardGroupId> expected_ids({group_id}); std::vector<NonStandardGroupId> expected_ids({group_id});
EXPECT_EQ(expected_ids, with_group_id.group_ids()); EXPECT_EQ(expected_ids, with_group_id.group_ids());