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

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: Addressed comments. 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..1ee7b0d7b20612fe8d63c561468ed320fd6e27d5 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -157,9 +157,8 @@
}
// 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 one at
+ // the time.
function twoGetUserMediaAndStop(constraints) {
console.log('Calling Two GetUserMedia');
navigator.webkitGetUserMedia(
@@ -173,18 +172,20 @@
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(streamPlayingInLocalView2) {
+ streamPlayingInLocalView2.getVideoTracks()[0].stop();
waitForVideoToStop('local-view-2');
+ // Make sure the video track in gLocalStream is still playing in
+ // 'local-view1' and then stop it.
+ 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