Bug 1296531 - Add error checks to test_mediarecorder_avoid_recursion.html. r?jib
MozReview-Commit-ID: E4RS2y6GJ5C
--- 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();