зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969583 - Remove the canplaythrough listener inside the canplaythrough listener, so that the listener only runs once. r=cpearce
This commit is contained in:
Родитель
1ad150972f
Коммит
69ea137fe6
|
@ -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);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче