| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script src="./resources/getUserMedia-helper.js"></script> |
| function tryAddTrack(stream, track) |
| testFailed("addTrack threw an exception."); |
| function createStreamAndAddTracks() |
| stream2 = new MediaStream(); |
| debug("MediaStream without tracks created."); |
| shouldBe('stream2.getAudioTracks().length', '0'); |
| audioTrack = stream1.getAudioTracks()[0]; |
| debug("Adding tracks to inactive stream"); |
| tryAddTrack(stream2, audioTrack); |
| shouldBe('stream2.getAudioTracks().length', '1'); |
| createStreamAndAddTracks(); |
| description("Test adding tracks to inactive MediaStream."); |
| getUserMedia("allow", {audio:true, video:true}, gotStream1); |
| window.jsTestIsAsync = true; |
| window.successfullyParsed = true; |
| <script src="../../resources/js-test-post.js"></script> |
| <body onload="startMedia()"> |