Bug 1296531 - Add error checks to test_mediarecorder_avoid_recursion.html. r?jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 17 Nov 2016 10:14:52 +0100
changeset 670294 f27e84e80c0a84515535045b0ef6ba71ac6e07a3
parent 670293 00f3560b619b053cbd3421cd7e93c6ec7bc4f8ab
child 670295 9b49bcd618c4b0c50139393b72425aeef066ff62
push id81598
push userbmo:apehrson@mozilla.com
push dateTue, 26 Sep 2017 09:13:19 +0000
reviewersjib
bugs1296531
milestone58.0a1
Bug 1296531 - Add error checks to test_mediarecorder_avoid_recursion.html. r?jib MozReview-Commit-ID: E4RS2y6GJ5C
dom/media/test/test_mediarecorder_avoid_recursion.html
--- a/dom/media/test/test_mediarecorder_avoid_recursion.html
+++ b/dom/media/test/test_mediarecorder_avoid_recursion.html
@@ -11,16 +11,23 @@ a Bug 897776</a>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 function startTest() {
   navigator.mozGetUserMedia({audio: true, fake: true}, function(stream) {
     var mediaRecorder = new MediaRecorder(stream);
     var count = 0;
     mediaRecorder.start();
     info("mediaRecorder start");
+    mediaRecorder.onerror = function () {
+      ok(false, 'Unexpected onerror callback fired');
+      SimpleTest.finish();
+    };
+    mediaRecorder.onwarning = function () {
+      ok(false, 'Unexpected onwarning callback fired');
+    };
     mediaRecorder.ondataavailable = function (e) {
       ++count;
       info("got ondataavailable data size = " + e.data.size);
       // no more requestData() to prevent busy main thread from starving
       // the encoding thread
       if (count == 30) {
         info("stream.stop");
         stream.stop();