зеркало из https://github.com/mozilla/gecko-dev.git
Bug 668973 - enable test_playback.html on Android and B2G. r=cpearce
This commit is contained in:
Родитель
4fad78d9c2
Коммит
7204779df4
|
@ -398,7 +398,6 @@ skip-if = true # bug 567954 and intermittent leaks
|
|||
# Seamonkey: Bug 598252, B2G: Bug 982100, Android: Bug 758476, bug 981086
|
||||
skip-if = appname == "seamonkey" || toolkit == 'gonk' || toolkit == 'android'
|
||||
[test_playback.html]
|
||||
skip-if = buildapp == 'b2g' || toolkit == 'android' # Disabled on Android & B2G due to bug 668973
|
||||
[test_playback_errors.html]
|
||||
[test_playback_rate.html]
|
||||
[test_playback_rate_playpause.html]
|
||||
|
|
|
@ -10,13 +10,37 @@
|
|||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
//longer timeout for sometimes B2G emulator runs very slowly
|
||||
if (SpecialPowers.Services.appinfo.name == "B2G") {
|
||||
SimpleTest.requestLongerTimeout(3);
|
||||
}
|
||||
|
||||
var manager = new MediaTestManager;
|
||||
|
||||
function localCheckMetadata(msg, e, test) {
|
||||
if (test.width) {
|
||||
is(e.videoWidth, test.width, msg + " video width");
|
||||
}
|
||||
if (test.height) {
|
||||
is(e.videoHeight, test.height, msg + " video height");
|
||||
}
|
||||
if (test.duration) {
|
||||
// see bug 1039901 for skipping mp3 duration test on B2G
|
||||
if (SpecialPowers.Services.appinfo.name == "B2G" && /mp3$/.test(test.name)) {
|
||||
todo(false, "Fix mp3 duration bug on B2G");
|
||||
return;
|
||||
}
|
||||
ok(Math.abs(e.duration - test.duration) < 0.1,
|
||||
msg + " duration (" + e.duration + ") should be around " + test.duration);
|
||||
}
|
||||
}
|
||||
|
||||
function startTest(test, token) {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "metadata";
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
var checkMetadata = localCheckMetadata;
|
||||
|
||||
v.src = test.name;
|
||||
v.name = test.name;
|
||||
|
|
Загрузка…
Ссылка в новой задаче