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..e0c9adf44dbd4301052a183f6633b63d84cf9d1d 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. |
| function twoGetUserMediaAndStop(constraints) { |
| console.log('Calling Two GetUserMedia'); |
| navigator.webkitGetUserMedia( |
| @@ -173,18 +171,17 @@ |
| constraints, |
| function(stream) { |
| displayIntoVideoElement(stream, |
| - stopStreamAndVerifyAllLocalViewsDontPlayVideo, 'local-view-2'); |
| + stopBothVideoTracksAndVerify(stream), |
|
phoglund_chromium
2014/04/08 12:04:21
This is wrong; you're supposed to pass in a callba
perkj_chrome
2014/04/09 15:31:32
Good catch
|
| + '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) { |
| waitForVideoToStop('local-view-2'); |
|
phoglund_chromium
2014/04/08 12:04:21
Hm. This is confusing, move the wait-for-video-to-
perkj_chrome
2014/04/09 15:31:32
Done.
|
| + stream.getVideoTracks()[0].stop(); |
| + // Make sure the original track is still playing and then stop it. |
|
phoglund_chromium
2014/04/08 12:04:21
So both tracks are no longer stopped by stopping t
perkj_chrome
2014/04/09 15:31:32
Right- stop is per track.
phoglund_chromium
2014/04/09 15:51:31
Ok, so you're stopping video track 0 on #183, then
perkj_chrome
2014/04/10 11:25:08
Done.
|
| + displayAndDetectVideo(gLocalStream, stopVideoTrack); |
| }; |
| } |