Bug 1296531 - Add error checks to test_mediarecorder_avoid_recursion.html. r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 17 Nov 2016 10:14:52 +0100
changeset 670650 e9335ee7fdfddf2165983ab1a34478c54fa17d2f
parent 670649 43a5598d0fc68ad36d2eb25ae6499ec73255b1b9
child 670651 57e339b35453d33a5bef2a8128b919b873850d3f
push id81678
push userkgupta@mozilla.com
push dateTue, 26 Sep 2017 17:28:53 +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();