mirror of
https://github.com/servo/servo.git
synced 2025-09-01 18:48:23 +01:00
Update web-platform-tests to revision efa05bfb3b338ef988f3ebf4523198512a248a99
This commit is contained in:
parent
26b40afe23
commit
de119adcc2
10 changed files with 445 additions and 5457 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue