Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0

This commit is contained in:
Ms2ger 2016-09-09 09:40:35 +02:00
parent 1d40075f03
commit 079092dfea
2381 changed files with 90360 additions and 17722 deletions

View file

@ -11,18 +11,12 @@ test(function() {
valueOf: function() { throw Error() }
};
var tests = [
[function() { return Audio() }, null, "No arguments, without new"],
[function() { return new Audio() }, null, "No arguments, with new"],
[function() { return Audio("") }, "", "Empty string argument, without new"],
[function() { return new Audio("") }, "", "Empty string argument, with new"],
[function() { return Audio("src") }, "src", "Non-empty string argument, without new"],
[function() { return new Audio("src") }, "src", "Non-empty string argument, with new"],
[function() { return Audio(null) }, "null", "Null argument, without new"],
[function() { return new Audio(null) }, "null", "Null argument, with new"],
[function() { return Audio(undefined) }, null, "Undefined argument, without new"],
[function() { return new Audio(undefined) }, null, "Undefined argument, with new"],
[function() { return Audio("", throwingObject) }, "", "Extra argument, without new"],
[function() { return new Audio("", throwingObject) }, "", "Extra argument, with new"],
[function() { return new Audio() }, null, "No arguments"],
[function() { return new Audio("") }, "", "Empty string argument"],
[function() { return new Audio("src") }, "src", "Non-empty string argument"],
[function() { return new Audio(null) }, "null", "Null argument"],
[function() { return new Audio(undefined) }, null, "Undefined argument"],
[function() { return new Audio("", throwingObject) }, "", "Extra argument"],
];
tests.forEach(function(t) {
var fn = t[0], expectedSrc = t[1], description = t[2];
@ -38,6 +32,11 @@ test(function() {
}, description);
});
});
test(function() {
assert_throws(new TypeError(), function() {
Audio();
});
}, "Calling Audio should throw");
test(function() {
assert_throws(new TypeError(), function() {
HTMLAudioElement();