Bug 1296531 - Log error first in test_mr_unsupported_src.html. r=jwwang
authorAndreas Pehrson <pehrsons@gmail.com>
Tue, 22 Nov 2016 09:53:44 +0100
changeset 670651 57e339b35453d33a5bef2a8128b919b873850d3f
parent 670650 e9335ee7fdfddf2165983ab1a34478c54fa17d2f
child 670652 b0dda92d1574c799126a187e18b961197670f594
push id81678
push userkgupta@mozilla.com
push dateTue, 26 Sep 2017 17:28:53 +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++;