Bug 1531439 - Part 1: Rewrite a test case to check for matches in stream id instead of matches in track id. r=jib
authorByron Campen [:bwc] <docfaraday@gmail.com>
Thu, 07 Mar 2019 21:46:42 +0000
changeset 520914 8bd2ac7f5d09da448033c76425d4c3bb53481786
parent 520913 267bf61505cf01bca8cf84c8d670088c86999278
child 520915 c9628b2b89b23bbbf49d9854f9c1569c614558e2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1531439
milestone67.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 1531439 - Part 1: Rewrite a test case to check for matches in stream id instead of matches in track id. r=jib Differential Revision: https://phabricator.services.mozilla.com/D21954
testing/web-platform/tests/webrtc/RTCPeerConnection-transceivers.https.html
--- a/testing/web-platform/tests/webrtc/RTCPeerConnection-transceivers.https.html
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-transceivers.https.html
@@ -134,19 +134,23 @@ promise_test(async t => {
 promise_test(async t => {
   const pc1 = createPeerConnectionWithCleanup(t);
   const [track, stream] = await createTrackAndStreamWithCleanup(t);
   pc1.addTrack(track, stream);
   const pc2 = createPeerConnectionWithCleanup(t);
   const trackEvent = await exchangeOfferAndListenToOntrack(t, pc1, pc2);
   assert_true(trackEvent.track instanceof MediaStreamTrack,
               'trackEvent.track instanceof MediaStreamTrack');
-  assert_equals(trackEvent.track.id, track.id,
-                'trackEvent.track.id == track.id');
-}, 'setRemoteDescription(offer): ontrack\'s track.id is the same as track.id');
+  assert_equals(trackEvent.streams.length, 1,
+                'trackEvent contains a single stream');
+  assert_true(trackEvent.streams[0] instanceof MediaStream,
+              'trackEvent has a MediaStream');
+  assert_equals(trackEvent.streams[0].id, stream.id,
+                'trackEvent.streams[0].id == stream.id');
+}, 'setRemoteDescription(offer): ontrack\'s stream.id is the same as stream.id');
 
 promise_test(async t => {
   const pc1 = createPeerConnectionWithCleanup(t);
   pc1.addTrack(... await createTrackAndStreamWithCleanup(t));
   const pc2 = createPeerConnectionWithCleanup(t);
   const trackEvent = await exchangeOfferAndListenToOntrack(t, pc1, pc2);
   assert_true(trackEvent.transceiver instanceof RTCRtpTransceiver,
               'trackEvent.transceiver instanceof RTCRtpTransceiver');