gecko/dom/media/tests/mochitest/test_getUserMedia_playVideoAudioTwice.html
Martin Thomson f55f1ca12b Bug 1119593 - Aggressively removing boilerplate on tests, r=drno
Conflicts:
	dom/media/tests/mochitest/test_getUserMedia_exceptions.html

--HG--
extra : rebase_source : 61d146fe146021d9114a67d6577ca749b30e2d69
2015-01-28 14:05:57 -08:00

28 lines
796 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<script type="application/javascript">
createHTML({title: "getUserMedia Play Video and Audio Twice", bug: "822109" });
/**
* Run a test that we can complete a video playback cycle twice in a row.
*/
runTest(function () {
getUserMedia({video: true, audio: true}).then(stream => {
var testVideo = createMediaElement('video', 'testVideo');
var playback = new LocalMediaStreamPlayback(testVideo, stream);
return playback.playMedia(false)
.then(() => playback.playMedia(true))
.then(() => stream.stop());
}).then(() => SimpleTest.finish(), generateErrorCallback());
});
</script>
</pre>
</body>
</html>