test of mediastream.ended when all tracks are ended
authorDominique Hazael-Massieux <dom@w3.org>
Tue, 04 Jun 2013 18:50:54 +0200
changeset 76 1c27f2e417fe
parent 75 0576b21710f5
child 77 f32d432459ab
test of mediastream.ended when all tracks are ended
--- a/submitted/W3C/mediastream-constructor.html	Tue Jun 04 18:45:44 2013 +0200
+++ b/submitted/W3C/mediastream-constructor.html	Tue Jun 04 18:50:54 2013 +0200
@@ -36,6 +36,8 @@
       var stream3 = new MediaStream([audioTrack2, videoTrack]);
       assert_equals(stream3.getTrackById(audioTrack2.id), null, "an ended track doesn't get added via the MediaStream constructor");
       assert_equals(stream3.getTrackById(videoTrack.id), videoTrack, "a non-ended track gets added via the MediaStream constructor even if the previous track was ended");
+      var stream5 = new MediaStream([audioTrack2]);
+     assert_true(stream5.ended, "a MediaStream created using the MediaStream() constructor whose arguments are lists of MediaStreamTrack objects that are all ended, the MediaStream object MUST be created with its ended attribute set to true");
     }, false);