From ba8b7f91e2b47529f31647398f70db17ef5840f7 Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Wed, 4 May 2016 11:28:14 +0200 Subject: [PATCH] Bug 1208373 - Test that ended tracks that are cloned are also ended. r=jib MozReview-Commit-ID: 4YU31TK0Mdf --HG-- extra : rebase_source : 0e5b37f101d22ccc0f439e97eb47596c8ae17847 extra : source : 0d4ff0ff0dac011751329d23122e8e55e37ee3f7 --- .../mochitest/test_getUserMedia_mediaStreamTrackClone.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html b/dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html index 117c63549b34..fa0c27b1d760 100644 --- a/dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html +++ b/dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html @@ -52,7 +52,10 @@ var test = createMediaElement('video', 'testClonePlayback'); var playback = new MediaStreamPlayback(test, cloneStream); - return playback.playMediaWithMediaStreamTracksStop(false); + return playback.playMediaWithMediaStreamTracksStop(false) + .then(() => info("Testing that clones of ended tracks are ended")) + .then(() => cloneStream.clone().getTracks().forEach(t => + is(t.readyState, "ended", "Track " + t.id + " should be ended"))); }) .then(() => getUserMedia({audio: true, video: true})).then(stream => { info("Test adding many track clones to the original stream");