Commit b1101c25 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Prevent timeout when remote stats are not implemented

This prevents a failure in RTCP messsaging from masking
other failures. It's up to other tests to actually
verify that RTCP stats have been delivered.

Bug: 904574
Change-Id: Ie641d5275372b4c10ad5fa3a39ae38c36f974482
Reviewed-on: https://chromium-review.googlesource.com/c/1341510Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610010}
parent 2ba53700
...@@ -2943,8 +2943,6 @@ crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-line-br ...@@ -2943,8 +2943,6 @@ crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-line-br
crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-text-transform-001.html [ Failure ] crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-text-transform-001.html [ Failure ]
crbug.com/626703 [ Win7 ] external/wpt/web-animations/animation-model/animation-types/accumulation-per-property.html [ Failure Timeout ] crbug.com/626703 [ Win7 ] external/wpt/web-animations/animation-model/animation-types/accumulation-per-property.html [ Failure Timeout ]
crbug.com/626703 [ Win7 ] external/wpt/IndexedDB/interleaved-cursors-large.html [ Crash ] crbug.com/626703 [ Win7 ] external/wpt/IndexedDB/interleaved-cursors-large.html [ Crash ]
crbug.com/626703 virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-track-stats.https.html [ Timeout ]
crbug.com/626703 external/wpt/webrtc/RTCPeerConnection-track-stats.https.html [ Timeout ]
crbug.com/903383 external/wpt/css/filter-effects/filter-cb-abspos-inline-003.html [ Failure ] crbug.com/903383 external/wpt/css/filter-effects/filter-cb-abspos-inline-003.html [ Failure ]
crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-combined-001.html [ Failure ] crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-combined-001.html [ Failure ]
crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-blur.html [ Failure ] crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-blur.html [ Failure ]
......
...@@ -251,6 +251,8 @@ function createDataChannelPair( ...@@ -251,6 +251,8 @@ function createDataChannelPair(
// Wait for RTP and RTCP stats to arrive // Wait for RTP and RTCP stats to arrive
async function waitForRtpAndRtcpStats(pc) { async function waitForRtpAndRtcpStats(pc) {
// If remote stats are never reported, return after 5 seconds.
const startTime = performance.now();
while (true) { while (true) {
const report = await pc.getStats(); const report = await pc.getStats();
const stats = [...report.values()].filter(({type}) => type.endsWith("bound-rtp")); const stats = [...report.values()].filter(({type}) => type.endsWith("bound-rtp"));
...@@ -259,6 +261,9 @@ async function waitForRtpAndRtcpStats(pc) { ...@@ -259,6 +261,9 @@ async function waitForRtpAndRtcpStats(pc) {
if (stats.length && stats.every(({localId, remoteId}) => localId || remoteId)) { if (stats.length && stats.every(({localId, remoteId}) => localId || remoteId)) {
break; break;
} }
if (performance.now() > startTime + 5000) {
break;
}
} }
} }
......
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