Bug 1296531 - Log error first in test_mr_unsupported_src.html. r?jwwang
MozReview-Commit-ID: 1xDVBCGYYDS
--- 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++;