blob: e88c2e42b74005fcf5d2e0a958788588b71f7979 [file] [log] [blame]
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +00001Test adding and removing tracks.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
commit-queue@webkit.org89d806e2014-04-24 06:37:51 +00006PASS stream1.active is true
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +00007PASS stream1.getAudioTracks().length is 1
8PASS stream1.getVideoTracks().length is 1
commit-queue@webkit.org89d806e2014-04-24 06:37:51 +00009PASS stream2.active is true
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000010PASS stream2.getAudioTracks().length is 1
11PASS stream2.getVideoTracks().length is 1
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000012
13*** remove an audio track
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000014PASS stream1.getAudioTracks().length is 0
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000015PASS stream1.getTrackById(audioTrack.id) is null
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000016
17*** remove a non-existent (already removed) track (should not throw)
18
19*** add the track back to the stream
20
21*** remove a video track
li.yin@intel.comfd3ae8e2013-03-18 09:28:08 +000022PASS stream1.getVideoTracks().length is 0
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000023PASS stream1.getTrackById(videoTrack.id) is null
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000024
25*** remove a non-existent (already removed) track (should not throw)
26
27*** add the track back to the stream
28
29*** verify added tracks
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000030PASS stream1.getAudioTracks().length is 1
31PASS stream1.getVideoTracks().length is 1
32PASS stream1.getAudioTracks()[0].kind is audioTrack.kind
33PASS stream1.getAudioTracks()[0].label is audioTrack.label
34PASS stream1.getVideoTracks()[0].kind is videoTrack.kind
35PASS stream1.getVideoTracks()[0].label is videoTrack.label
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000036
37*** try adding a stream's own tracks again (nothing should happen)
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000038PASS stream1.getAudioTracks().length is 1
39PASS stream1.getVideoTracks().length is 1
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000040
41*** add tracks from another stream
42
43*** verify added tracks
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000044PASS stream1.getAudioTracks().length is 2
45PASS stream1.getVideoTracks().length is 2
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000046
adam.bergkvist@ericsson.com3a5a2c52015-06-29 19:52:21 +000047*** remove all tracks, stream will become inactive
eric.carlson@apple.com439f74a2013-10-29 20:48:21 +000048PASS stream2.getAudioTracks().length is 0
49PASS stream2.getVideoTracks().length is 0
eric.carlson@apple.com01bf7ee2013-09-27 01:08:17 +000050
adam.bergkvist@ericsson.com3a5a2c52015-06-29 19:52:21 +000051*** active attribute is still true (until event is fired)
52PASS stream2.active is true
53
commit-queue@webkit.org89d806e2014-04-24 06:37:51 +000054Stream2 is inactive.
adam.bergkvist@ericsson.com3a5a2c52015-06-29 19:52:21 +000055PASS stream2.active is false
56
57*** add non-ended track
58PASS audioTrack.readyState is not "ended"
59
60*** active attribute is still false (until event is fired)
61PASS stream2.active is false
62
63Stream2 is active.
64PASS stream2.active is true
adam.bergkvist@ericsson.com335aa7a2013-03-04 10:07:39 +000065PASS successfullyParsed is true
66
67TEST COMPLETE
68