1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <link rel="stylesheet" href="../js/resources/js-test-style.css">
5 <script src="../js/resources/js-test-pre.js"></script>
8 <p id="description"></p>
9 <div id="console"></div>
11 description("Tests webkitMediaStream.");
14 testFailed('Stream generation failed.');
18 function getUserMedia(dictionary, callback) {
20 navigator.webkitGetUserMedia(dictionary, callback, error);
22 testFailed('webkitGetUserMedia threw exception :' + e);
27 function gotStream(s) {
29 testPassed('Got local stream.');
30 shouldBe('localStream.audioTracks.length', '1');
31 shouldBe('localStream.videoTracks.length', '1');
34 shouldBeTrue("typeof webkitMediaStream === 'function'");
35 shouldNotThrow("stream = new webkitMediaStream(localStream.audioTracks, localStream.videoTracks);");
36 shouldBeNonNull(stream);
37 shouldBeDefined(stream);
38 shouldBe("stream.constructor.name", "'MediaStream'");
39 shouldBe('stream.audioTracks.length', '1');
40 shouldBe('stream.videoTracks.length', '1');
44 getUserMedia({video:true, audio:true}, gotStream);
46 window.jsTestIsAsync = true;
47 window.successfullyParsed = true;
49 <script src="../js/resources/js-test-post.js"></script>