Bug 969583 - Remove the canplaythrough listener inside the canplaythrough listener, so that the listener only runs once. r=cpearce

This commit is contained in:
JW Wang 2014-02-12 10:44:17 +08:00
Родитель 1ad150972f
Коммит 69ea137fe6
4 изменённых файлов: 4 добавлений и 0 удалений

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

@ -85,6 +85,7 @@ function startTest(test, token) {
};
element.oncanplaythrough = function () {
element.oncanplaythrough = null;
// If content has ended, skip the test
if (element.ended) {
ok(true, 'ended fired before canplaythrough, skipping test');

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

@ -55,6 +55,7 @@ function startTest(test, token) {
}
element.oncanplaythrough = function () {
element.oncanplaythrough = null;
for (var i = 0; i < mExpectStopCount; i++) {
mediaRecorder.start(1000);
mediaRecorder.stop();

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

@ -86,6 +86,7 @@ function startTest(test, token) {
// Start recording once canplaythrough fires
element.oncanplaythrough = function() {
element.oncanplaythrough = null;
mediaRecorder.start(250);
is(mediaRecorder.state, 'recording', 'Media recorder should be recording');
is(mediaRecorder.stream, element.stream,

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

@ -156,6 +156,7 @@ function startTest(test, token) {
element.stream = element.mozCaptureStream();
element.oncanplaythrough = function () {
element.oncanplaythrough = null;
runStateTransitionTests(element.stream);
manager.finished(token);
};