Bug 1437672 - Wait for the promise to resolve in order to declare test complete. r?pehrsons draft
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 27 Feb 2018 23:48:21 +0200
changeset 760533 fdba6330259a4104675c8f8b882756df51a034dc
parent 760532 425a45b15434dc251f8d68c50dad8fde4d635613
push id100690
push userachronop@gmail.com
push dateTue, 27 Feb 2018 21:52:11 +0000
reviewerspehrsons
bugs1437672
milestone60.0a1
Bug 1437672 - Wait for the promise to resolve in order to declare test complete. r?pehrsons MozReview-Commit-ID: 8CidLiehCag
dom/media/tests/crashtests/799419.html
--- a/dom/media/tests/crashtests/799419.html
+++ b/dom/media/tests/crashtests/799419.html
@@ -11,22 +11,22 @@ https://bugzilla.mozilla.org/show_bug.cg
       document.documentElement.removeAttribute("class");
     }
 
     function boom() {
       var v0 = new RTCPeerConnection();
       var v1 = new RTCPeerConnection();
       var v2 = document.getElementById("pc1video");
       var v3 = document.getElementById("pc2video");
-      navigator.mozGetUserMedia({video:true, fake: true},
-        function(stream) {}, function() {});
+
+      navigator.mediaDevices.getUserMedia({video: true, fake: true})
+      .then((s) => {finish()});
+
       v0.close();
       v1.close();
-
-      finish();
     }
   </script>
 </head>
 <body onload="setTimeout(boom, 100)">
 <video id="pc1video" width="100" height="100" controls></video>
 <video id="pc2video" width="100" height="100" controls></video>
 </body>
 </html>