Bug 1258143 - Test that MediaStream is the primary interface of a getUserMedia-stream. r=jib
☠☠ backed out by 2fe9ae645046 ☠ ☠
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 11 Oct 2018 15:49:52 +0000
changeset 496611 514420f15a67df92c218191b23a3b4bcd4b7ea95
parent 496610 905c871bcf0366ad037e4409ce21afe2a2fba440
child 496612 bb8d7ab5e55fea5d8a962b59364d35eb955d8d94
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1258143
milestone64.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 1258143 - Test that MediaStream is the primary interface of a getUserMedia-stream. r=jib Differential Revision: https://phabricator.services.mozilla.com/D8376
testing/web-platform/tests/mediacapture-streams/idlharness.https.window.js
--- a/testing/web-platform/tests/mediacapture-streams/idlharness.https.window.js
+++ b/testing/web-platform/tests/mediacapture-streams/idlharness.https.window.js
@@ -29,32 +29,32 @@ promise_test(async () => {
         media = item;
       default:
         assert_unreached(
           'media.kind should be one of "audioinput", "videoinput", or "audiooutput".');
       }
     }
   } catch (e) {}
 
-  let track, trackEvent;
+  let stream, track, trackEvent;
   try {
-    const stream = await navigator.mediaDevices.getUserMedia({audio: true});
+    stream = await navigator.mediaDevices.getUserMedia({audio: true});
     track = stream.getTracks()[0];
     trackEvent = new MediaStreamTrackEvent("type", {
       track: track,
     });
   } catch (e) { throw e}
 
   if (input) {
     idl_array.add_objects({ InputDeviceInfo: [input] });
   } else {
     idl_array.add_objects({ MediaDeviceInfo: [media] });
   }
   idl_array.add_objects({
-    MediaStream: ['new MediaStream()'],
+    MediaStream: [stream, 'new MediaStream()'],
     Navigator: ['navigator'],
     MediaDevices: ['navigator.mediaDevices'],
     MediaStreamTrack: [track],
     MediaStreamTrackEvent: [trackEvent],
     OverconstrainedErrorEvent: ['new OverconstrainedErrorEvent("type", {})'],
   });
   idl_array.test();
 }, 'mediacapture-streams interfaces.');