Backed out changeset e24de2c6fdb6 (bug 1208373)

This commit is contained in:
Carsten "Tomcat" Book 2016-05-13 13:51:48 +02:00
Родитель 7a87aa569d
Коммит 706a10fa58
2 изменённых файлов: 0 добавлений и 56 удалений

Просмотреть файл

@ -78,7 +78,6 @@ skip-if = (toolkit == 'gonk' || buildapp == 'mulet' && debug) # copied from basi
[test_getUserMedia_stopVideoAudioStreamWithFollowupVideoAudio.html]
[test_getUserMedia_stopVideoStream.html]
[test_getUserMedia_stopVideoStreamWithFollowupVideo.html]
[test_getUserMedia_trackEnded.html]
[test_getUserMedia_peerIdentity.html]
skip-if = toolkit == 'gonk' || buildapp == 'mulet' # b2g(Bug 1021776, too --ing slow on b2g)
[test_peerConnection_addIceCandidate.html]

Просмотреть файл

@ -1,55 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<iframe id="iframe" srcdoc="
<script type='application/javascript'>
document.gUM = (constraints, success, failure) =>
navigator.mediaDevices.getUserMedia(constraints).then(success, failure);
</script>">
</iframe>
<script type="application/javascript">
"use strict";
createHTML({
title: "getUserMedia MediaStreamTrack 'ended' event on navigating",
bug: "1208373",
});
runTest(() => {
let iframe = document.getElementById("iframe");
let stream;
// We're passing callbacks into a method in the iframe here, because
// a Promise created in the iframe is unusable after the iframe has
// navigated away (see bug 1269400 for details).
return new Promise((resolve, reject) =>
iframe.contentDocument.gUM({audio: true, video: true}, resolve, reject))
.then(s => stream = s)
.then(() => {
var allTracksEnded = Promise.all(stream.getTracks().map(t => {
info("Set up ended handler for track " + t.id);
return haveEvent(t, "ended", wait(5000))
.then(event => {
info("ended handler invoked for track " + t.id);
is(event.target, t, "Target should be correct");
}, e => e ? Promise.reject(e)
: ok(false, "ended event never raised for track " + t.id));
}));
stream.getTracks().forEach(t =>
is(t.readyState, "live",
"Non-ended track should have readyState 'live'"));
iframe.srcdoc = "";
info("iframe has been reset. Waiting for tracks to end.");
return allTracksEnded;
})
.then(() => stream.getTracks().forEach(t =>
is(t.readyState, "ended",
"Ended track should have readyState 'ended'")));
});
</script>
</pre>
</body>
</html>