Bug 1296531 - Log error first in test_mr_unsupported_src.html. r?jwwang draft
authorAndreas Pehrson <pehrsons@gmail.com>
Tue, 22 Nov 2016 09:53:44 +0100
changeset 670295 9b49bcd618c4b0c50139393b72425aeef066ff62
parent 670294 f27e84e80c0a84515535045b0ef6ba71ac6e07a3
child 670296 0aae6aeda0d13c0a482768e77e399e338c3487cf
push id81598
push userbmo:apehrson@mozilla.com
push dateTue, 26 Sep 2017 09:13:19 +0000
reviewersjwwang
bugs1296531
milestone58.0a1
Bug 1296531 - Log error first in test_mr_unsupported_src.html. r?jwwang MozReview-Commit-ID: 1xDVBCGYYDS
dom/media/test/test_mediarecorder_unsupported_src.html
--- a/dom/media/test/test_mediarecorder_unsupported_src.html
+++ b/dom/media/test/test_mediarecorder_unsupported_src.html
@@ -28,16 +28,17 @@ function startTest() {
       // 3. onstop
       var callbackStep = 0;
       var mediaRecorder = new MediaRecorder(stream);
 
       is(mediaRecorder.stream, stream, 'Stream should be provided on creation');
 
       mediaRecorder.onerror = function (e) {
         callbackStep++;
+        info('onerror callback fired');
         if (callbackStep == 1) {
           try {
             mediaRecorder.pause();
             ok(false, 'pause should fire an exception if called on an inactive recorder');
           } catch(e) {
             ok(e instanceof DOMException, 'pause should fire an exception ' +
               'if called on an inactive recorder');
             is(e.name, 'InvalidStateError', 'Exception name should be InvalidStateError');
@@ -45,17 +46,16 @@ function startTest() {
         }
         ok(callbackStep == 1, 'onerror callback should handle be the 1st event fired');
         is(e.error.name, 'UnknownError', 'Error name should be UnknownError.');
         ok(e.error.stack.includes('test_mediarecorder_unsupported_src.html'),
           'Events fired from onerror should include an error with a stack trace indicating ' +
           'an error in this test');
         is(mediaRecorder.mimeType, '', 'mimetype should be empty');
         is(mediaRecorder.state, 'inactive', 'state is inactive');
-        info('onerror callback fired');
       };
 
       mediaRecorder.onwarning = function () {
         ok(false, 'Unexpected onwarning callback fired.');
       };
 
       mediaRecorder.ondataavailable = function (evt) {
         callbackStep++;