Bug 1081251 - register error handlers for all media elements in EME mochitests. r=cpearce

This commit is contained in:
JW Wang 2015-01-09 01:46:00 +01:00
Родитель c51a1c2a25
Коммит c9cb9579ea
5 изменённых файлов: 3 добавлений и 9 удалений

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

@ -198,6 +198,9 @@ function SetupEME(test, token, params)
}, false);
});
// Finish the test when error is encountered.
v.onerror = bail(token + " got error event");
var onSetKeysFail = (params && params.onSetKeysFail)
? params.onSetKeysFail
: bail(token + " Failed to set MediaKeys on <video> element");

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

@ -38,8 +38,6 @@ function startTest(test, token)
manager.finished(token);
});
v.addEventListener("error", bail(token + " got error event"));
LoadTest(test, v, token);
}

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

@ -127,8 +127,6 @@ function startTest(test, token)
}
);
v.addEventListener("error", bail(token + " got error event"));
LoadTest(test, v, token);
}

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

@ -81,8 +81,6 @@ function startTest(test, token)
manager.finished(token);
});
v.addEventListener("error", bail(token + " got error event"));
LoadTest(test, v, token).then(function(){v.play();}, bail(token + " failed to load"));
}

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

@ -28,7 +28,6 @@ function startTest(test, token)
var v1 = SetupEME(test, case1token, { onSetKeysFail: setKeysFailed });
var context = new AudioContext();
var node = context.createMediaElementSource(v1);
v1.addEventListener("error", bail(case1token + " got error event"));
v1.addEventListener("loadeddata", function(ev) {
ok(false, TimeStamp(case1token) + " should never reach loadeddata, as setMediaKeys should fail");
});
@ -39,7 +38,6 @@ function startTest(test, token)
// Case 2. creating a MediaElementSource on a media element with a MediaKeys should fail.
var case2token = token + "_case2";
var v2 = SetupEME(test, case2token);
v2.addEventListener("error", bail(case2token + " got error event"));
v2.addEventListener("loadeddata", function(ev) {
ok(true, case2token + " should reach loadeddata");
var threw = false;
@ -59,7 +57,6 @@ function startTest(test, token)
// Case 3. capturing a media element with mozCaptureStream that has a MediaKeys should fail.
var case3token = token + "_case3";
var v3 = SetupEME(test, case3token);
v3.addEventListener("error", bail(case3token + " got error event"));
v3.addEventListener("loadeddata", function(ev) {
ok(true, TimeStamp(case3token) + " should reach loadeddata");
var threw = false;