Commit 2f8faea9 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

WPT webrtc/getstats test: Allow 0 and 1 datachannels

There seems to be a race on whether the count of datachannels
is incremented before a session goes to "connected". This CL
allows both 0 and 1.

The test would fail ~1/4000 times on a Linux workstation.

Bug: 771540
Change-Id: Ic250443c2addef995dbb26e7cd021a516dcd023b
Reviewed-on: https://chromium-review.googlesource.com/721379Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509564}
parent 282709e9
...@@ -3740,8 +3740,6 @@ crbug.com/771492 [ Win Linux Mac ] external/wpt/css/css-tables-3/table-model-fix ...@@ -3740,8 +3740,6 @@ crbug.com/771492 [ Win Linux Mac ] external/wpt/css/css-tables-3/table-model-fix
# Suspended WebRTC tests # Suspended WebRTC tests
# Test fails, and output changes for each run. # Test fails, and output changes for each run.
crbug.com/771540 external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer.html [ Failure ] crbug.com/771540 external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer.html [ Failure ]
# Test is flaky after removing mock PeerConnectionHandler
crbug.com/771540 external/wpt/webrtc/getstats.html [ Pass Failure ]
# Sheriff failures 2017-10-04 # Sheriff failures 2017-10-04
crbug.com/770691 [ Win7 Linux Mac10.11 ] media/controls/lazy-loaded-style.html [ Failure Pass ] crbug.com/770691 [ Win7 Linux Mac10.11 ] media/controls/lazy-loaded-style.html [ Failure Pass ]
......
...@@ -68,11 +68,14 @@ This test uses data only, and thus does not require fake media devices. ...@@ -68,11 +68,14 @@ This test uses data only, and thus does not require fake media devices.
} }
showStats.innerHTML = JSON.stringify(reportDictionary, null, 2); showStats.innerHTML = JSON.stringify(reportDictionary, null, 2);
// Check the stats properties. // Check the stats properties.
assert_not_equals(report, null); assert_not_equals(report, null, 'No report');
let sessionStat = getStatsRecordByType(report, 'peer-connection'); let sessionStat = getStatsRecordByType(report, 'peer-connection');
assert_not_equals(sessionStat, null, 'Did not find peer-connection stats'); assert_not_equals(sessionStat, null, 'Did not find peer-connection stats');
assert_exists(sessionStat, 'dataChannelsOpened'); assert_exists(sessionStat, 'dataChannelsOpened', 'no dataChannelsOpened stat');
assert_equals(sessionStat.dataChannelsOpened, 1); // Once every 4000 or so tests, the datachannel won't be opened when the getStats
// function is done, so allow both 0 and 1 datachannels.
assert_true(sessionStat.dataChannelsOpened == 1 || sessionStat.dataChannelsOpened == 0,
'dataChannelsOpened count wrong');
test.done(); test.done();
}) })
.catch(test.step_func(function(e) { .catch(test.step_func(function(e) {
...@@ -93,7 +96,6 @@ This test uses data only, and thus does not require fake media devices. ...@@ -93,7 +96,6 @@ This test uses data only, and thus does not require fake media devices.
// The createDataChannel is necessary and sufficient to make // The createDataChannel is necessary and sufficient to make
// sure the ICE connection be attempted. // sure the ICE connection be attempted.
gFirstConnection.createDataChannel('channel'); gFirstConnection.createDataChannel('channel');
var atStep = 'Create offer'; var atStep = 'Create offer';
gFirstConnection.createOffer() gFirstConnection.createOffer()
......
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