Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: LayoutTests/fast/mediastream/MediaStream-add-remove-tracks.html

Issue 397903003: Implement sequence<MediaStreamTrack> getTracks () This is to conform to the new spec- http://dev.w3… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/MediaStream-add-remove-tracks-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/MediaStream-add-remove-tracks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698