Bug 1528323 - Part 3: Fix a mochitest that was abandoning its promises, and not noticing exceptions as a result. r=jib
authorByron Campen [:bwc] <docfaraday@gmail.com>
Wed, 27 Feb 2019 16:06:26 +0000
changeset 519349 e4e4e4a15fc124878f9dab7298350661afb7238d
parent 519348 f6a0bad24920fdb2b84b4391a98e7a16cec9d93b
child 519350 7faa9b2768ed41c88088b9ecd58b89fb0101a5cd
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
bugs1528323
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 1528323 - Part 3: Fix a mochitest that was abandoning its promises, and not noticing exceptions as a result. r=jib Differential Revision: https://phabricator.services.mozilla.com/D21016
dom/media/tests/mochitest/test_peerConnection_trackless_sender_stats.html
--- a/dom/media/tests/mochitest/test_peerConnection_trackless_sender_stats.html
+++ b/dom/media/tests/mochitest/test_peerConnection_trackless_sender_stats.html
@@ -31,26 +31,26 @@
             is(receivers.length, 2, "Have exactly two receivers.");
             for(let kind of ["audio", "video"]) {
               is(senders.filter(s => s.track.kind == kind).length, 1,
                   "Exactly 1 sender of kind " + kind);
               is(receivers.filter(r => r.track.kind == kind).length, 1,
                   "Exactly 1 receiver of kind " + kind);
             }
             // Remove tracks from senders
-            senders.forEach(async sender => {
+            for (const sender of senders) {
               await sender.replaceTrack(null);
               is(sender.track, null, "Sender track removed");
               let stats = await sender.getStats();
               ok(stats instanceof window.RTCStatsReport, "Stats is instance of RTCStatsReport");
               // Number of stats in the report. This should be 0.
               is(stats.size, 0, "Trackless sender stats report is empty");
-            });
+            }
           })
         });
     test.setMediaConstraints([{audio: true}, {video: true}], []);
     test.run();
   });
 
 </script>
 </pre>
 </body>
-</html>
\ No newline at end of file
+</html>