Add origin trial ids to non-standard stats members.

Bug: chromium:943076
Change-Id: I2d8211d3acd844cf602ed1c7de08bb7441263950
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128420
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27186}
This commit is contained in:
Jakob Ivarsson
2019-03-19 15:38:49 +01:00
committed by Commit Bot
parent edd2054562
commit 758d946106
3 changed files with 46 additions and 7 deletions

View File

@ -339,6 +339,16 @@ TEST(RTCStatsTest, IsStandardized) {
EXPECT_FALSE(unstandardized.is_standardized());
}
TEST(RTCStatsTest, NonStandardGroupId) {
auto group_id = NonStandardGroupId::kRtcAudioJitterBufferMaxPackets;
RTCNonStandardStatsMember<int32_t> with_group_id("stat", {group_id});
std::vector<NonStandardGroupId> expected_ids({group_id});
EXPECT_EQ(expected_ids, with_group_id.group_ids());
RTCNonStandardStatsMember<int32_t> without_group_id("stat");
EXPECT_TRUE(without_group_id.group_ids().empty());
}
// Death tests.
// Disabled on Android because death tests misbehave on Android, see
// base/test/gtest_util.h.