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 383025 57e339b35453d33a5bef2a8128b919b873850d3f
parent 383024 e9335ee7fdfddf2165983ab1a34478c54fa17d2f
child 383026 b0dda92d1574c799126a187e18b961197670f594
push id32582
push userkwierso@gmail.com
push dateWed, 27 Sep 2017 00:11:27 +0000
treeherdermozilla-central@70158e4e215d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1296531
milestone58.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 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++;