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

Unified Diff: content/test/data/media/getusermedia.html

Issue 218763007: Update MediaStreamTrack::Stop to latest draft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test WebRtcGetUserMediaBrowserTest.TwoGetUserMediaAndStop Created 6 years, 8 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 | « content/renderer/media/webrtc_local_audio_track_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
}
« no previous file with comments | « content/renderer/media/webrtc_local_audio_track_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698