Index: LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html |
diff --git a/LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html b/LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html |
index 214c97b091dce2f1738022ce1dc047ac65548f54..2ef08db836bd900ef0c33de0c48ae81fc95c9bc3 100644 |
--- a/LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html |
+++ b/LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html |
@@ -53,9 +53,11 @@ function gotStream2(s) { |
shouldBe('stream1.getAudioTracks().length', '1'); |
shouldBe('stream1.getVideoTracks().length', '1'); |
+ shouldBe('stream1.getTracks().length', '2'); |
shouldBe('stream2.getAudioTracks().length', '1'); |
shouldBe('stream2.getVideoTracks().length', '1'); |
+ shouldBe('stream2.getTracks().length', '2'); |
stream1.onaddtrack = shouldNotFire; |
stream1.onremovetrack = shouldNotFire; |
@@ -67,6 +69,8 @@ function gotStream2(s) { |
tryRemoveTrack(stream1, audioTrack); |
// verify removed tracks |
shouldBe('stream1.getAudioTracks().length', '0'); |
+ // verify that gettracks length is reduced by 1 |
+ shouldBe('stream1.getTracks().length', '1'); |
shouldBeNull('stream1.getTrackById(audioTrack.id)'); |
// remove a non-existent (already removed) track (should not throw) |
tryRemoveTrack(stream1, audioTrack); |
@@ -77,6 +81,8 @@ function gotStream2(s) { |
tryRemoveTrack(stream1, videoTrack); |
shouldBe('stream1.getVideoTracks().length', '0'); |
+ // verify that gettracks length is reduced by 1 |
+ shouldBe('stream1.getTracks().length', '1'); |
shouldBeNull('stream1.getTrackById(videoTrack.id)'); |
tryRemoveTrack(stream1, videoTrack); |
tryAddTrack(stream1, videoTrack); |
@@ -84,6 +90,7 @@ function gotStream2(s) { |
// verify added tracks |
shouldBe('stream1.getAudioTracks().length', '1'); |
shouldBe('stream1.getVideoTracks().length', '1'); |
+ shouldBe('stream1.getTracks().length', '2'); |
// verify that kind and label is preserved |
shouldBe('stream1.getAudioTracks()[0].kind', 'audioTrack.kind'); |
@@ -98,6 +105,7 @@ function gotStream2(s) { |
// verify that nothing has changed |
shouldBe('stream1.getAudioTracks().length', '1'); |
shouldBe('stream1.getVideoTracks().length', '1'); |
+ shouldBe('stream1.getTracks().length', '2'); |
// add new tracks (from stream2) |
tryAddTrack(stream1, stream2.getAudioTracks()[0]); |
@@ -106,6 +114,7 @@ function gotStream2(s) { |
// verify added tracks |
shouldBe('stream1.getAudioTracks().length', '2'); |
shouldBe('stream1.getVideoTracks().length', '2'); |
+ shouldBe('stream1.getTracks().length', '4'); |
// when all tracks have been removed, stream.ended should return true. |
tryRemoveTrack(stream2, stream2.getAudioTracks()[0]); |