blob: 6752caa964f1012145e9fcc005ab918c98fbc3b0 [file] [log] [blame]
Tests the RTCPeerConnection stats interface.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}) did not throw exception.
PASS pc.getStats(statsHandler1) did not throw exception.
PASS statsHandler1 was called
PASS status is non-null.
PASS result.length is 0
PASS getUserMedia({audio:true, video:true}, gotStream) did not throw exception.
PASS Got a stream.
PASS pc.getStats(statsHandler2) did not throw exception.
PASS statsHandler2 was called
PASS result.length is >= 2
PASS timestamp is >= startTime
PASS local.names().length is >= 1
PASS local.names().indexOf("type") is >= 0
PASS local.stat("type") is "audio"
PASS res.timestamp is >= startTime
PASS res.id is non-null.
PASS res.type is non-null.
PASS res.names().length is >= 1
PASS res.names().indexOf("type") is >= 0
PASS res.stat("type") is "audio"
PASS status_g.namedItem(res.id) is non-null.
PASS status_g[res.id] is non-null.
PASS successfullyParsed is true
TEST COMPLETE