Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<title>Test MediaRecorder Creation</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="manifest.js"></script>
<pre id="test">
<script class="testbody" type="text/javascript">
var manager = new MediaTestManager;
* Starts a test on every media recorder file included to check that
* a media recorder object created with a stream derived from a media
* element with that file produces the correct starting attribute values.
function startTest(test, token) {
var element = document.createElement('audio');
element.token = token;
element.src =;
element.test = test; = element.mozCaptureStreamUntilEnded();
var mediaRecorder = new MediaRecorder(;
'Stream should be provided stream on creation');
is(mediaRecorder.mimeType, '',
'mimeType should be an empty string on creation');
is(mediaRecorder.state, 'inactive',
'state should be inactive on creation');
manager.runTests(gMediaRecorderTests, startTest);