зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changesets 7e3a322f9fd6, 91749b627a04, and 69bf31cfafa1 (bug 916135) for Android mochitest failures.
This commit is contained in:
Родитель
721f59de48
Коммит
eabf46c3c0
|
@ -502,13 +502,6 @@ bool OmxDecoder::IsWaitingMediaResources()
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool isInEmulator()
|
||||
{
|
||||
char propQemu[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.kernel.qemu", propQemu, "");
|
||||
return !strncmp(propQemu, "1", 1);
|
||||
}
|
||||
|
||||
bool OmxDecoder::AllocateMediaResources()
|
||||
{
|
||||
// OMXClient::connect() always returns OK and abort's fatally if
|
||||
|
@ -533,7 +526,9 @@ bool OmxDecoder::AllocateMediaResources()
|
|||
// up.
|
||||
int flags = kHardwareCodecsOnly;
|
||||
|
||||
if (isInEmulator()) {
|
||||
char propQemu[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.kernel.qemu", propQemu, "");
|
||||
if (!strncmp(propQemu, "1", 1)) {
|
||||
// If we are in emulator, allow to fall back to software.
|
||||
flags = 0;
|
||||
}
|
||||
|
@ -973,16 +968,6 @@ nsresult OmxDecoder::Play()
|
|||
// We need to fix it until it is really happened.
|
||||
void OmxDecoder::Pause()
|
||||
{
|
||||
/* The implementation of OMXCodec::pause is flawed.
|
||||
* OMXCodec::start will not restore from the paused state and result in
|
||||
* buffer timeout which causes timeouts in mochitests.
|
||||
* Since there is not power consumption problem in emulator, we will just
|
||||
* return when running in emulator to fix timeouts in mochitests.
|
||||
*/
|
||||
if (isInEmulator()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mVideoPaused || mAudioPaused) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -577,15 +577,6 @@ function getMajorMimeType(mimetype) {
|
|||
}
|
||||
}
|
||||
|
||||
function removeNodeAndSource(n) {
|
||||
n.remove();
|
||||
// force release of underlying decoder
|
||||
n.src = "";
|
||||
while (n.firstChild) {
|
||||
n.removeChild(n.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
// Number of tests to run in parallel. Warning: Each media element requires
|
||||
// at least 3 threads (4 on Linux), and on Linux each thread uses 10MB of
|
||||
// virtual address space. Beware!
|
||||
|
@ -709,12 +700,12 @@ function MediaTestManager() {
|
|||
function mediaTestCleanup() {
|
||||
var V = document.getElementsByTagName("video");
|
||||
for (i=0; i<V.length; i++) {
|
||||
removeNodeAndSource(V[i]);
|
||||
V[i].parentNode.removeChild(V[i]);
|
||||
V[i] = null;
|
||||
}
|
||||
var A = document.getElementsByTagName("audio");
|
||||
for (i=0; i<A.length; i++) {
|
||||
removeNodeAndSource(A[i]);
|
||||
A[i].parentNode.removeChild(A[i]);
|
||||
A[i] = null;
|
||||
}
|
||||
SpecialPowers.forceGC();
|
||||
|
|
|
@ -22,7 +22,6 @@ for (var i = 0; i < parent.gSmallTests.length; ++i) {
|
|||
var elemType = /^audio/.test(test.type) ? "audio" : "video";
|
||||
// Associate these elements with the subframe's document
|
||||
var e = document.createElement(elemType);
|
||||
e.preload = "auto";
|
||||
if (e.canPlayType(test.type)) {
|
||||
e.src = test.name;
|
||||
e.addEventListener("loadeddata", loadedData, false);
|
||||
|
|
|
@ -31,9 +31,7 @@ function ended1(e) {
|
|||
if (v._endCount == 2) {
|
||||
ok(true, "Playing after pause while ended works for " + v._name);
|
||||
v._finished = true;
|
||||
v.removeEventListener("loadedmetadata", start, false);
|
||||
v.removeEventListener("ended", ended1, false);
|
||||
removeNodeAndSource(v);
|
||||
v.parentNode.removeChild(v);
|
||||
manager.finished(v.token);
|
||||
return;
|
||||
}
|
||||
|
@ -58,16 +56,12 @@ function seeked2(e) {
|
|||
|
||||
ok(v.paused, "Paused after seek after pause while ended for " + v._name);
|
||||
v._finished = true;
|
||||
v.removeEventListener("loadedmetadata", start, false);
|
||||
v.removeEventListener("ended", ended2, false);
|
||||
v.removeEventListener("seeked", seeked2, false);
|
||||
removeNodeAndSource(v);
|
||||
v.parentNode.removeChild(v);
|
||||
manager.finished(v.token);
|
||||
}
|
||||
|
||||
function createVideo(test, x, token) {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "auto";
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
v.src = test.name;
|
||||
|
|
|
@ -39,7 +39,6 @@ function mediaEnded(event) {
|
|||
function startTest(test, token) {
|
||||
var elemType = /^audio/.test(test.type) ? "audio" : "video";
|
||||
var v1 = document.createElement(elemType);
|
||||
v1.preload = "auto";
|
||||
|
||||
v1.src = test.name;
|
||||
if (test.duration) {
|
||||
|
|
|
@ -17,10 +17,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=654550
|
|||
|
||||
/* Test for Bug 654550 */
|
||||
|
||||
// Parallel test must be disabled for media.video_stats.enabled is a global setting
|
||||
// to prevent the setting from changing unexpectedly in the middle of the test.
|
||||
PARALLEL_TESTS = 1;
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
var manager = new MediaTestManager;
|
||||
|
||||
function checkStats(v, aShouldBeEnabled) {
|
||||
|
@ -63,6 +59,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=654550
|
|||
v.play();
|
||||
SpecialPowers.setBoolPref("media.video_stats.enabled", true);
|
||||
v.addEventListener("timeupdate", ontimeupdate);
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
}
|
||||
|
||||
manager.runTests(gVideoTests, startTest);
|
||||
|
|
|
@ -48,7 +48,6 @@ function onended(event) {
|
|||
|
||||
function startTest(test, token) {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "auto";
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
v.src = test.name;
|
||||
|
|
|
@ -57,7 +57,6 @@ function loadStart(evt) {
|
|||
// Create all video objects.
|
||||
for (var i=0; i<g404Tests.length; ++i) {
|
||||
var v = document.createElement("video");
|
||||
v.preload = "auto";
|
||||
var test = g404Tests[i];
|
||||
if (!v.canPlayType(test.type)) {
|
||||
continue;
|
||||
|
|
|
@ -62,7 +62,7 @@ var gMedia = null;
|
|||
|
||||
function createMedia(tag) {
|
||||
gMedia = document.createElement(tag);
|
||||
gMedia.preload = "auto";
|
||||
gMedia.setAttribute("preload", "auto");
|
||||
for (var i=0; i<gEventTypes.length; i++) {
|
||||
gMedia.addEventListener(gEventTypes[i], listener, false);
|
||||
}
|
||||
|
@ -166,14 +166,12 @@ var gTests = [
|
|||
|
||||
function nextTest() {
|
||||
if (gMedia) {
|
||||
for (var i=0; i<gEventTypes.length; i++) {
|
||||
gMedia.removeEventListener(gEventTypes[i], listener, false);
|
||||
}
|
||||
removeNodeAndSource(gMedia);
|
||||
if (gMedia.parentNode)
|
||||
gMedia.parentNode.removeChild(gMedia);
|
||||
gMedia = null;
|
||||
}
|
||||
gEventNum = 0;
|
||||
|
||||
|
||||
if (gTestNum == gTests.length) {
|
||||
gTestNum = 0;
|
||||
++gTestFileNum;
|
||||
|
|
|
@ -44,14 +44,13 @@ var extension = {
|
|||
|
||||
function startTest(test, token) {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "auto";
|
||||
v.addEventListener("error", function(){ok(false,"Error events on source children should not bubble");}, false);
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
v._error = 0;
|
||||
v._finished = false;
|
||||
v._name = test.name;
|
||||
|
||||
|
||||
var s1 = document.createElement("source");
|
||||
s1.type = test.type;
|
||||
s1.src = "404." + extension[test.type];
|
||||
|
|
|
@ -22,9 +22,6 @@ function cloneLoaded(event) {
|
|||
"Clone " + e.currentSrc + " duration: " + e.duration + " expected: " + e._expectedDuration);
|
||||
}
|
||||
|
||||
e.removeEventListener("loadeddata", cloneLoaded, false);
|
||||
removeNodeAndSource(e);
|
||||
|
||||
manager.finished(e.token);
|
||||
}
|
||||
|
||||
|
@ -32,7 +29,7 @@ function tryClone(event) {
|
|||
var e = event.target;
|
||||
var clone = e.cloneNode(false);
|
||||
clone.token = e.token;
|
||||
|
||||
|
||||
if (e._expectedDuration) {
|
||||
ok(Math.abs(e.duration - e._expectedDuration) < 0.1,
|
||||
e.currentSrc + " duration: " + e.duration + " expected: " + e._expectedDuration);
|
||||
|
@ -40,9 +37,6 @@ function tryClone(event) {
|
|||
}
|
||||
|
||||
clone.addEventListener("loadeddata", cloneLoaded, false);
|
||||
|
||||
e.removeEventListener("loadeddata", tryClone, false);
|
||||
removeNodeAndSource(e);
|
||||
}
|
||||
|
||||
// This test checks that loading the same URI twice in different elements at the same time
|
||||
|
@ -55,7 +49,6 @@ function tryClone(event) {
|
|||
function initTest(test, token) {
|
||||
var elemType = /^audio/.test(test.type) ? "audio" : "video";
|
||||
var e = document.createElement(elemType);
|
||||
e.preload = "auto";
|
||||
if (e.canPlayType(test.type)) {
|
||||
e.src = test.name;
|
||||
if (test.duration) {
|
||||
|
|
|
@ -16,7 +16,6 @@ var manager = new MediaTestManager;
|
|||
|
||||
function startTest(test, token) {
|
||||
var a = document.createElement('audio');
|
||||
a.preload = "auto";
|
||||
a.token = token;
|
||||
manager.started(token);
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ function onloadedmetadata(e) {
|
|||
function startTest(test, token) {
|
||||
var elemType = /^audio/.test(test.type) ? "audio" : "video";
|
||||
var element = document.createElement(elemType);
|
||||
element.preload = "auto";
|
||||
|
||||
element.token = token;
|
||||
manager.started(token);
|
||||
|
|
|
@ -21,9 +21,7 @@ function do_ended(e) {
|
|||
var v = e.target;
|
||||
ok(!v._finished, "Only one ended event for " + v._name);
|
||||
v._finished = true;
|
||||
v.removeEventListener("ended", do_ended, false);
|
||||
v.removeEventListener("progress", do_progress, false);
|
||||
removeNodeAndSource(v);
|
||||
v.parentNode.removeChild(v);
|
||||
manager.finished(v.token);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ var elements;
|
|||
function didPlay(event) {
|
||||
ok(true, "Element ended: " + event.target.currentSrc);
|
||||
|
||||
removeNodeAndSource(event.target);
|
||||
|
||||
--testsWaiting;
|
||||
if (testsWaiting == 0) {
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -53,16 +53,6 @@ function playing(evt) {
|
|||
evt.target._playingCount++;
|
||||
}
|
||||
|
||||
function removeNodeAndListener(n) {
|
||||
n.removeEventListener("loadedmetadata", loadedMetaData, false);
|
||||
n.removeEventListener("ended", playbackEnded, false);
|
||||
n.removeEventListener("playing", playing, false);
|
||||
n.removeEventListener("loadeddata", loadedData, false);
|
||||
n.removeEventListener("seeking", seekStarted, false);
|
||||
n.removeEventListener("seeked", seekEnded, false);
|
||||
removeNodeAndSource(n);
|
||||
}
|
||||
|
||||
function playbackEnded(evt) {
|
||||
var v = evt.target;
|
||||
v._endCount++;
|
||||
|
@ -82,14 +72,13 @@ function playbackEnded(evt) {
|
|||
is(v._endCount, 2, "Should have received two ended events for " + v._name);
|
||||
ok(v._playingCount > 0, "Should have at least one playing event for " + v._name);
|
||||
v._finished = true;
|
||||
removeNodeAndListener(v);
|
||||
v.parentNode.removeChild(v);
|
||||
manager.finished(v.token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function startTest(test, token) {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "auto";
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
v.src = test.name;
|
||||
|
|
|
@ -57,7 +57,6 @@ function playing(e) {
|
|||
function initTest(test, token) {
|
||||
var type = getMajorMimeType(test.type);
|
||||
var v = document.createElement(type);
|
||||
v.preload = "auto";
|
||||
v.token = token;
|
||||
manager.started(token);
|
||||
v.src = test.name;
|
||||
|
|
|
@ -51,7 +51,6 @@ function createTestArray() {
|
|||
function startTest(test, token) {
|
||||
var elemType = getMajorMimeType(test.type);
|
||||
var element = document.createElement(elemType);
|
||||
element.preload = "auto";
|
||||
element.src = test.name;
|
||||
element.token = token;
|
||||
test.setup(element);
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
<script class="testbody" type="text/javascript">
|
||||
var v1 = document.getElementById("v1");
|
||||
var a1 = document.getElementById("a1");
|
||||
v1.preload = "auto";
|
||||
a1.preload = "auto";
|
||||
|
||||
is(v1.src, "", "src should be null");
|
||||
is(a1.src, "", "src should be null");
|
||||
|
|
|
@ -32,11 +32,9 @@
|
|||
SimpleTest.finish();
|
||||
} else {
|
||||
var v = document.createElement('video');
|
||||
v.preload = "auto";
|
||||
v.innerHTML = "<source src=\"" + media.name + "?fail\" media=\"not all\">" +
|
||||
"<source src=\""+ media.name + "?pass\" media=\"all\">";
|
||||
var v2 = document.createElement("video");
|
||||
v2.preload = "auto";
|
||||
v2.innerHTML = "<source src=\""+ media.name +"?pass\">" +
|
||||
"<source src=\""+ media.name + "?fail\" media=\"all\">";
|
||||
document.body.appendChild(v);
|
||||
|
|
|
@ -40,10 +40,10 @@ function ended(e) {
|
|||
// confusing the test results.
|
||||
v.removeEventListener("ended", ended, false);
|
||||
v.removeEventListener("timeupdate", timeupdate, false);
|
||||
for (var i = 0; i < eventsToLog.length; ++i) {
|
||||
v.removeEventListener(eventsToLog[i], logEvent, false);
|
||||
}
|
||||
removeNodeAndSource(v);
|
||||
v.removeEventListener("timeupdate", logEvent, false);
|
||||
v.removeEventListener("pause", logEvent, false);
|
||||
v.removeEventListener("stalled", logEvent, false);
|
||||
v.parentNode.removeChild(v);
|
||||
manager.finished(v.token);
|
||||
},
|
||||
500);
|
||||
|
|
|
@ -15,38 +15,58 @@
|
|||
"layout/base/tests/test_bug465448.xul":"",
|
||||
|
||||
"layout/forms/test/test_bug478219.xhtml":"window.closed not working, bug 907795",
|
||||
"content/media/test":"bug 918299",
|
||||
"content/media/test/test_bug448534.html": "Timed out, bug 894922? Bug 902677 is for the timing out of a lot of media tests",
|
||||
"content/media/mediasource/test/test_MediaSource.html": " ReferenceError: MediaSource is not defined",
|
||||
"content/media/test/test_autoplay_contentEditable.html": "bug 899074 - timeouts",
|
||||
"content/media/test/test_bug465498.html":"",
|
||||
"content/media/test/test_bug493187.html":"",
|
||||
"content/media/test/test_bug495300.html":"",
|
||||
"content/media/test/test_bug495145.html": "timed out",
|
||||
"content/media/test/test_bug654550.html": "timed out",
|
||||
"content/media/test/test_bug686942.html": "timed out",
|
||||
"content/media/test/test_buffered.html" : "assertion failures",
|
||||
"content/media/test/test_can_play_type.html":"timed out",
|
||||
"content/media/test/test_can_play_type_mpeg.html":"7 failures out of 27",
|
||||
"content/media/test/test_can_play_type_no_dash.html":"",
|
||||
"content/media/test/test_can_play_type_ogg.html":"",
|
||||
"content/media/test/test_chaining.html": "timed out",
|
||||
"content/media/test/test_delay_load.html": "6 failures",
|
||||
"content/media/test/test_error_on_404.html": "timed out",
|
||||
"content/media/test/test_framebuffer.html": "timed out",
|
||||
"content/media/test/test_info_leak.html": "2 failures",
|
||||
"content/media/test/test_load.html": "Timed out after gizmo.mp4",
|
||||
"content/media/test/test_load_candidates.html": "timed out",
|
||||
"content/media/test/test_load_same_resource.html": "",
|
||||
"content/media/test/test_media_selection.html": "timed out",
|
||||
"content/media/test/test_metadata.html": "",
|
||||
"content/media/test/test_mozHasAudio.html": "",
|
||||
"content/media/test/test_play_events.html": "Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough",
|
||||
"content/media/test/test_play_events_2.html": "Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough",
|
||||
"content/media/test/test_playback.html": "Test timed out, bug 668973?",
|
||||
"content/media/test/test_playback_rate.html": "",
|
||||
"content/media/test/test_playback_rate_playpause.html": "",
|
||||
"content/media/test/test_played.html": "",
|
||||
"content/media/test/test_progress.html": "bug 901716 - timeouts",
|
||||
"content/media/test/test_reactivate.html": "timed out in small-shot.mp3",
|
||||
"content/media/test/test_referer.html":"",
|
||||
"content/media/test/test_replay_metadata.html": "",
|
||||
"content/media/test/test_seekable1.html": "",
|
||||
"content/media/test/test_seekable3.html": "timed out",
|
||||
"content/media/test/test_seek.html": "",
|
||||
"content/media/test/test_seek_out_of_range.html": "",
|
||||
"content/media/test/test_source.html": "",
|
||||
"content/media/test/test_source_media.html": "",
|
||||
"content/media/test/test_streams_element_capture.html": "bug 900172 - timeouts",
|
||||
"content/media/test/test_streams_element_capture_reset.html": "bug 901102",
|
||||
"content/media/test/test_streams_gc.html": "Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value",
|
||||
"content/media/test/test_unseekable.html":"",
|
||||
"content/media/webaudio":"bug 916135",
|
||||
"content/media/webspeech/recognition/test/test_recognition_service_error.html": "timed out",
|
||||
"content/media/webspeech/synth/ipc/test/test_ipc.html": "comp.classes['@mozilla.org/special-powers-observer;1'] is undefined",
|
||||
"content/media/webspeech/synth/test/test_speech_queue.html": "Test timed out",
|
||||
"content/media/webspeech/synth/test/test_speech_simple.html": "Test timed out",
|
||||
|
||||
"content/media/webaudio/test/test_mozaudiochannel.html": "",
|
||||
|
||||
"dom/imptests/editing/selecttest/test_addRange.html": "oom?, bug 775227",
|
||||
"dom/imptests/html/dom/ranges/test_Range-insertNode.html":"oom?, bug 775227",
|
||||
"dom/imptests/html/dom/ranges/test_Range-cloneContents.html":"",
|
||||
|
|
Загрузка…
Ссылка в новой задаче