Update web-platform-tests to revision efa05bfb3b338ef988f3ebf4523198512a248a99

This commit is contained in:
Ms2ger 2016-02-26 11:10:34 +01:00
parent 26b40afe23
commit de119adcc2
10 changed files with 445 additions and 5457 deletions

View file

@ -52,4 +52,33 @@ test(function() {
var evt = document.createEvent("U\u0131Event");
});
}, "Should throw NOT_SUPPORTED_ERR for unrecognized arguments");
/*
The following are event interfaces which do actually exist, but must still
throw since they're absent from the table in the spec
for document.createEvent().
This list is not exhaustive.
*/
var someNonCreateableEvents = [
"AnimationEvent",
"DragEvent",
"ErrorEvent",
"FocusEvent",
"PointerEvent",
"TransitionEvent",
"WheelEvent"
];
someNonCreateableEvents.forEach(function (eventInterface) {
test(function () {
assert_throws("NOT_SUPPORTED_ERR", function () {
var evt = document.createEvent(eventInterface);
});
}, 'Should throw NOT_SUPPORTED_ERR for non-legacy event interface "' + eventInterface + '"');
test(function () {
assert_throws("NOT_SUPPORTED_ERR", function () {
var evt = document.createEvent(eventInterface + "s");
});
}, 'Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "' + eventInterface + '"');
});
</script>