Chromium Code Reviews| Index: content/test/data/media/getusermedia.html |
| diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html |
| index 7da11753b19c1a0b528772aa2cfce73275d93165..b2b104c41fc45e90e8609102b296c2cbaa1bff98 100644 |
| --- a/content/test/data/media/getusermedia.html |
| +++ b/content/test/data/media/getusermedia.html |
| @@ -157,9 +157,7 @@ |
| } |
| // Creates two MediaStream and renders them locally. When the video of both |
| - // streams are detected to be rolling, we stop the local stream. Since both |
| - // streams have the same source, both video streams should stop. If they do, |
| - // the test succeeds. |
| + // streams are detected to be rolling, we stop the local video tracks. |
|
phoglund_chromium
2014/04/09 15:51:31
... One at a time.
perkj_chrome
2014/04/10 11:25:08
Done.
|
| function twoGetUserMediaAndStop(constraints) { |
| console.log('Calling Two GetUserMedia'); |
| navigator.webkitGetUserMedia( |
| @@ -173,18 +171,19 @@ |
| constraints, |
| function(stream) { |
| displayIntoVideoElement(stream, |
| - stopStreamAndVerifyAllLocalViewsDontPlayVideo, 'local-view-2'); |
| + function() { |
| + stopBothVideoTracksAndVerify(stream); |
| + }, |
| + 'local-view-2'); |
| }, |
| failedCallback); |
| }; |
| - var stopStreamAndVerifyAllLocalViewsDontPlayVideo = function() { |
| - gLocalStream.getVideoTracks()[0].stop(); |
| - |
| - // Since local-view and local-view-2 are playing the video from the same |
| - // source, both of them should stop. |
| - waitForVideoToStop('local-view'); |
| + var stopBothVideoTracksAndVerify = function(stream) { |
| + stream.getVideoTracks()[0].stop(); |
| waitForVideoToStop('local-view-2'); |
| + // Make sure the original track is still playing and then stop it. |
| + displayAndDetectVideo(gLocalStream, stopVideoTrack); |
| }; |
| } |