Bug 1518735 - reformat PeerConnection stats test r=mjf
authorNico Grunbaum <na-g@nostrum.com>
Wed, 09 Jan 2019 22:04:57 +0000
changeset 510254 3b5346cfb6c89c15f8ccdaa08e304f4ecc21dad1
parent 510253 5c70351492dab61461ac07609bfb75ca7da405b0
child 510255 c118f7527dc6cb9c5926fd0e81fd14ff3eba0d73
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1518735
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518735 - reformat PeerConnection stats test r=mjf reformating the PeerConnection stats test to make it easier to maintain Differential Revision: https://phabricator.services.mozilla.com/D16015
dom/media/tests/mochitest/test_peerConnection_stats.html
--- a/dom/media/tests/mochitest/test_peerConnection_stats.html
+++ b/dom/media/tests/mochitest/test_peerConnection_stats.html
@@ -5,97 +5,266 @@
 </head>
 <body>
 <pre id="test">
 <script type="application/javascript">
   createHTML({
     bug: "1337525",
     title: "webRtc Stats composition and sanity"
   });
-var statsExpectedByType = {
+const statsExpectedByType = {
   "inbound-rtp": {
-    expected: ["id", "timestamp", "type", "ssrc", "mediaType",
-      "kind", "packetsReceived", "packetsLost", "bytesReceived", "jitter",],
-    optional: ["remoteId","nackCount",],
-    localVideoOnly: ["discardedPackets", "framerateStdDev", "framerateMean",
-      "bitrateMean", "bitrateStdDev", "firCount", "pliCount", "framesDecoded",],
-    unimplemented: ["mediaTrackId", "transportId", "codecId",
-      "packetsDiscarded", "associateStatsId",
-      "sliCount", "qpSum", "packetsRepaired", "fractionLost",
-      "burstPacketsLost", "burstLossCount", "burstDiscardCount",
-      "gapDiscardRate", "gapLossRate",],
-    deprecated: ["mozRtt", "isRemote",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "ssrc",
+      "mediaType",
+      "kind",
+      "packetsReceived",
+      "packetsLost",
+      "bytesReceived",
+      "jitter",
+    ],
+    optional: [
+      "remoteId",
+      "nackCount",
+    ],
+    localVideoOnly: [
+      "discardedPackets",
+      "framerateStdDev",
+      "framerateMean",
+      "bitrateMean",
+      "bitrateStdDev",
+      "firCount",
+      "pliCount",
+      "framesDecoded",
+    ],
+    unimplemented: [
+      "mediaTrackId",
+      "transportId",
+      "codecId",
+      "packetsDiscarded",
+      "associateStatsId",
+      "sliCount",
+      "qpSum",
+      "packetsRepaired",
+      "fractionLost",
+      "burstPacketsLost",
+      "burstLossCount",
+      "burstDiscardCount",
+      "gapDiscardRate",
+      "gapLossRate",
+    ],
+    deprecated: [
+      "mozRtt",
+      "isRemote",
+    ],
   },
   "outbound-rtp": {
-    expected: ["id", "timestamp", "type", "ssrc", "mediaType",
-      "kind", "packetsSent", "bytesSent", "remoteId",],
-    optional: ["nackCount",],
-    localVideoOnly: ["droppedFrames", "bitrateMean", "bitrateStdDev",
-      "framerateMean", "framerateStdDev", "framesEncoded", "firCount",
-      "pliCount",],
-    unimplemented: ["mediaTrackId", "transportId", "codecId",
-      "sliCount", "qpSum", "targetBitrate",],
-    deprecated: ["isRemote",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "ssrc",
+      "mediaType",
+      "kind",
+      "packetsSent",
+      "bytesSent",
+      "remoteId",
+    ],
+    optional: [
+      "nackCount",
+    ],
+    localVideoOnly: [
+      "droppedFrames",
+      "bitrateMean",
+      "bitrateStdDev",
+      "framerateMean",
+      "framerateStdDev",
+      "framesEncoded",
+      "firCount",
+      "pliCount",
+    ],
+    unimplemented: [
+      "mediaTrackId",
+      "transportId",
+      "codecId",
+      "sliCount",
+      "qpSum",
+      "targetBitrate",
+    ],
+    deprecated: [
+      "isRemote",
+    ],
   },
   "remote-inbound-rtp": {
-    expected: ["id", "timestamp", "type", "ssrc", "mediaType",
-      "kind", "packetsReceived", "packetsLost", "bytesReceived", "jitter",
-      "localId",],
-    optional: ["roundTripTime", "nackCount",],
-    unimplemented: ["mediaTrackId", "transportId", "codecId",
-      "packetsDiscarded", "associateStatsId",
-      "sliCount", "qpSum", "packetsRepaired", "fractionLost",
-      "burstPacketsLost", "burstLossCount", "burstDiscardCount",
-      "gapDiscardRate", "gapLossRate",],
-    deprecated: ["mozRtt", "isRemote",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "ssrc",
+      "mediaType",
+      "kind",
+      "packetsReceived",
+      "packetsLost",
+      "bytesReceived",
+      "jitter",
+      "localId",
+    ],
+    optional: [
+      "roundTripTime",
+      "nackCount",
+    ],
+    unimplemented: [
+      "mediaTrackId",
+      "transportId",
+      "codecId",
+      "packetsDiscarded",
+      "associateStatsId",
+      "sliCount",
+      "qpSum",
+      "packetsRepaired",
+      "fractionLost",
+      "burstPacketsLost",
+      "burstLossCount",
+      "burstDiscardCount",
+      "gapDiscardRate",
+      "gapLossRate",
+    ],
+    deprecated: [
+      "mozRtt",
+      "isRemote",
+    ],
   },
   "remote-outbound-rtp": {
-    expected: ["id", "timestamp", "type", "ssrc", "mediaType",
-      "kind", "packetsSent", "bytesSent", "localId",],
-    optional: ["nackCount",],
-    unimplemented: ["mediaTrackId", "transportId", "codecId",
-      "sliCount", "qpSum", "targetBitrate",],
-    deprecated: ["isRemote",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "ssrc",
+      "mediaType",
+      "kind",
+      "packetsSent",
+      "bytesSent",
+      "localId",
+    ],
+    optional: [
+      "nackCount",
+    ],
+    unimplemented: [
+      "mediaTrackId",
+      "transportId",
+      "codecId",
+      "sliCount",
+      "qpSum",
+      "targetBitrate",
+    ],
+    deprecated: [
+      "isRemote",
+    ],
   },
   "csrc": { skip: true },
   "codec": { skip: true },
   "peer-connection": { skip: true },
   "data-channel": { skip: true },
   "track": { skip: true },
   "transport": { skip: true },
   "candidate-pair": {
-    expected: ["id", "timestamp", "type",
-      "transportId", "localCandidateId", "remoteCandidateId", "state",
-      "priority", "nominated", "writable", "readable",
-      "bytesSent", "bytesReceived",
-      "lastPacketSentTimestamp", "lastPacketReceivedTimestamp",
-      "componentId",],
-    optional: ["selected",],
-    unimplemented: ["totalRoundTripTime", "currentRoundTripTime",
-      "availableOutgoingBitrate", "availableIncomingBitrate",
-      "requestsReceived", "requestsSent", "responsesReceived",
-      "responsesSent", "retransmissionsReceived", "retransmissionsSent",
-      "consentRequestsSent",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "transportId",
+      "localCandidateId",
+      "remoteCandidateId",
+      "state",
+      "priority",
+      "nominated",
+      "writable",
+      "readable",
+      "bytesSent",
+      "bytesReceived",
+      "lastPacketSentTimestamp",
+      "lastPacketReceivedTimestamp",
+      "componentId",
+    ],
+    optional: [
+      "selected",
+    ],
+    unimplemented: [
+      "totalRoundTripTime",
+      "currentRoundTripTime",
+      "availableOutgoingBitrate",
+      "availableIncomingBitrate",
+      "requestsReceived",
+      "requestsSent",
+      "responsesReceived",
+      "responsesSent",
+      "retransmissionsReceived",
+      "retransmissionsSent",
+      "consentRequestsSent",
+    ],
     deprecated: [],
   },
   "local-candidate": {
-    expected: ["id", "timestamp", "type", "address",
-               "protocol", "port", "candidateType", "priority",],
-    optional: ["relayProtocol",],
-    unimplemented: ["networkType", "url", "transportId"],
-    deprecated: ["candidateId", "portNumber", "ipAddress", "componentId", "mozLocalTransport",
-      "transport",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "address",
+      "protocol",
+      "port",
+      "candidateType",
+      "priority",
+    ],
+    optional: [
+      "relayProtocol",
+    ],
+    unimplemented: [
+      "networkType",
+      "url",
+      "transportId"
+    ],
+    deprecated: [
+      "candidateId",
+      "portNumber",
+      "ipAddress",
+      "componentId",
+      "mozLocalTransport",
+      "transport",
+    ],
   },
   "remote-candidate": {
-    expected: ["id", "timestamp", "type", "address",
-               "protocol", "port", "candidateType", "priority",],
-    optional: ["relayProtocol",],
-    unimplemented: ["networkType", "url", "transportId",],
-    deprecated: ["candidateId", "portNumber", "ipAddress", "componentId", "mozLocalTransport",
-                 "transport",],
+    expected: [
+      "id",
+      "timestamp",
+      "type",
+      "address",
+      "protocol",
+      "port",
+      "candidateType",
+      "priority",
+    ],
+    optional: [
+      "relayProtocol",
+    ],
+    unimplemented: [
+      "networkType",
+      "url",
+      "transportId",
+    ],
+    deprecated: [
+      "candidateId",
+      "portNumber",
+      "ipAddress",
+      "componentId",
+      "mozLocalTransport",
+      "transport",
+    ],
   },
   "certificate": { skip: true },
 };
 
 ["in", "out"].forEach(pre => {
   let s = statsExpectedByType[pre + "bound-rtp"];
   s.optional = [...s.optional, ...s.localVideoOnly];
 });