Commit 432e9601 authored by hbos's avatar hbos Committed by Commit bot

Prep-CL for adding new RTCStatsMeember types in WebRTC repo.

If-statement prevents a crash in a unittest that would occur if rolling
after the WebRTC change.

The WebRTC change: https://codereview.webrtc.org/2387343002/

BUG=chromium:627816

Review-Url: https://codereview.chromium.org/2390743003
Cr-Commit-Position: refs/heads/master@{#422758}
parent 6198868c
......@@ -720,6 +720,12 @@ TEST_F(RTCPeerConnectionHandlerTest, GetRTCStats) {
for (size_t i = 0; i < stats->membersCount(); ++i) {
std::unique_ptr<blink::WebRTCStatsMember> member =
stats->getMember(i);
// TODO(hbos): A WebRTC-change is adding new members, this would cause
// not all members to be defined. This if-statement saves Chromium from
// crashing. As soon as the change has been rolled in, I will update
// this test. crbug.com/627816
if (!member->isDefined())
continue;
EXPECT_TRUE(member->isDefined());
members.insert(member->type());
switch (member->type()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment