mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231793: Part 7 - Fixed various tests. r=jya
This commit is contained in:
parent
2ab805fef1
commit
780d874dc2
@ -681,6 +681,7 @@ var gMetadataTests = [
|
|||||||
{ name:"wave_metadata_bad_len.wav", tags: {
|
{ name:"wave_metadata_bad_len.wav", tags: {
|
||||||
name:"Track Title",
|
name:"Track Title",
|
||||||
artist:"Artist Name",
|
artist:"Artist Name",
|
||||||
|
comments:"Comments",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ name:"wave_metadata_bad_no_null.wav", tags: {
|
{ name:"wave_metadata_bad_no_null.wav", tags: {
|
||||||
|
@ -20,24 +20,19 @@ function startTest(test, token) {
|
|||||||
ok(el.error, "Element 'error' attr expected to have a value");
|
ok(el.error, "Element 'error' attr expected to have a value");
|
||||||
ok(el.error instanceof MediaError, "Element 'error' attr expected to be MediaError");
|
ok(el.error instanceof MediaError, "Element 'error' attr expected to be MediaError");
|
||||||
is(el.error.code, MediaError.MEDIA_ERR_DECODE, "Expected a decode error");
|
is(el.error.code, MediaError.MEDIA_ERR_DECODE, "Expected a decode error");
|
||||||
is(el.networkState, HTMLMediaElement.NETWORK_EMPTY, "networkState should be EMPTY");
|
|
||||||
el._sawError = true;
|
el._sawError = true;
|
||||||
}, false);
|
|
||||||
|
|
||||||
v.addEventListener("emptied", function (event) {
|
|
||||||
var el = event.currentTarget;
|
|
||||||
is(el.networkState, HTMLMediaElement.NETWORK_EMPTY, "networkState should be EMPTY");
|
|
||||||
ok(el._sawError, "Expected error event");
|
|
||||||
manager.finished(token);
|
manager.finished(token);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
v.addEventListener("loadedmetadata", function () {
|
v.addEventListener("loadeddata", function () {
|
||||||
ok(false, "Unexpected loadedmetadata event");
|
ok(false, "Unexpected loadeddata event");
|
||||||
|
manager.finished(token);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
v.autoplay = true;
|
v.autoplay = true;
|
||||||
v.addEventListener("ended", function () {
|
v.addEventListener("ended", function () {
|
||||||
ok(false, "Unexpected ended event");
|
ok(false, "Unexpected ended event");
|
||||||
|
manager.finished(token);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
v.src = test.name; // implicitly starts a load.
|
v.src = test.name; // implicitly starts a load.
|
||||||
|
@ -23,11 +23,11 @@ function finishTest(a) {
|
|||||||
function decodeUsingAudioElement() {
|
function decodeUsingAudioElement() {
|
||||||
var a = new Audio();
|
var a = new Audio();
|
||||||
a.addEventListener("error", function() {
|
a.addEventListener("error", function() {
|
||||||
ok(true, "We should not be able to decode this file using an HTMLAudioElement");
|
ok(false, "Error loading metadata");
|
||||||
finishTest(a);
|
finishTest(a);
|
||||||
});
|
});
|
||||||
a.addEventListener("loadedmetadata", function() {
|
a.addEventListener("loadedmetadata", function() {
|
||||||
ok(false, "We should not be able to decode this file using an HTMLMediaElement.");
|
ok(true, "Metadata Loaded");
|
||||||
finishTest(a);
|
finishTest(a);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user