mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947
This commit is contained in:
parent
183772583f
commit
a91433f0c8
234 changed files with 4368 additions and 967 deletions
|
@ -1,4 +1,5 @@
|
|||
@ayg
|
||||
@foolip
|
||||
@jdm
|
||||
@Ms2ger
|
||||
@plehegar
|
||||
|
|
|
@ -282,6 +282,7 @@ var encodingMap = {
|
|||
],
|
||||
"shift_jis": [
|
||||
"csshiftjis",
|
||||
"ms932",
|
||||
"ms_kanji",
|
||||
"shift-jis",
|
||||
"shift_jis",
|
||||
|
|
|
@ -33,11 +33,23 @@ function testAlias(arg, iface) {
|
|||
"isTrusted should be initialized to false");
|
||||
}, "createEvent('" + arg + "') should be initialized correctly.");
|
||||
}
|
||||
aliases.forEach(function(alias) {
|
||||
testAlias(alias[0], alias[1]);
|
||||
testAlias(alias[0].toLowerCase(), alias[1]);
|
||||
testAlias(alias[0].toUpperCase(), alias[1]);
|
||||
});
|
||||
for (var alias in aliases) {
|
||||
var iface = aliases[alias];
|
||||
testAlias(alias, iface);
|
||||
testAlias(alias.toLowerCase(), iface);
|
||||
testAlias(alias.toUpperCase(), iface);
|
||||
|
||||
if (!alias.endsWith("s")) {
|
||||
var plural = alias + "s";
|
||||
if (!(plural in aliases)) {
|
||||
test(function () {
|
||||
assert_throws("NOT_SUPPORTED_ERR", function () {
|
||||
var evt = document.createEvent(plural);
|
||||
});
|
||||
}, 'Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "' + plural + '"');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test(function() {
|
||||
assert_throws("NOT_SUPPORTED_ERR", function() {
|
||||
|
@ -61,11 +73,73 @@ This list is not exhaustive.
|
|||
*/
|
||||
var someNonCreateableEvents = [
|
||||
"AnimationEvent",
|
||||
"AnimationPlayerEvent",
|
||||
"ApplicationCacheErrorEvent",
|
||||
"AudioProcessingEvent",
|
||||
"AutocompleteErrorEvent",
|
||||
"BeforeInstallPromptEvent",
|
||||
"BeforeUnloadEvent",
|
||||
"BlobEvent",
|
||||
"ClipboardEvent",
|
||||
"CloseEvent",
|
||||
"CompositionEvent",
|
||||
"DeviceLightEvent",
|
||||
"DeviceMotionEvent",
|
||||
"DeviceOrientationEvent",
|
||||
"DragEvent",
|
||||
"ErrorEvent",
|
||||
"ExtendableEvent",
|
||||
"ExtendableMessageEvent",
|
||||
"FetchEvent",
|
||||
"FocusEvent",
|
||||
"FontFaceSetLoadEvent",
|
||||
"GamepadEvent",
|
||||
"GeofencingEvent",
|
||||
"HashChangeEvent",
|
||||
"IDBVersionChangeEvent",
|
||||
"InstallEvent",
|
||||
"KeyEvent",
|
||||
"MIDIConnectionEvent",
|
||||
"MIDIMessageEvent",
|
||||
"MediaEncryptedEvent",
|
||||
"MediaKeyEvent",
|
||||
"MediaKeyMessageEvent",
|
||||
"MediaQueryListEvent",
|
||||
"MediaStreamEvent",
|
||||
"MediaStreamTrackEvent",
|
||||
"MutationEvent",
|
||||
"NotificationEvent",
|
||||
"OfflineAudioCompletionEvent",
|
||||
"OrientationEvent",
|
||||
"PageTransitionEvent",
|
||||
"PointerEvent",
|
||||
"PopStateEvent",
|
||||
"PresentationConnectionAvailableEvent",
|
||||
"PresentationConnectionCloseEvent",
|
||||
"ProgressEvent",
|
||||
"PromiseRejectionEvent",
|
||||
"PushEvent",
|
||||
"RTCDTMFToneChangeEvent",
|
||||
"RTCDataChannelEvent",
|
||||
"RTCIceCandidateEvent",
|
||||
"RelatedEvent",
|
||||
"ResourceProgressEvent",
|
||||
"SVGEvent",
|
||||
"SVGZoomEvent",
|
||||
"SecurityPolicyViolationEvent",
|
||||
"ServicePortConnectEvent",
|
||||
"ServiceWorkerMessageEvent",
|
||||
"SpeechRecognitionError",
|
||||
"SpeechRecognitionEvent",
|
||||
"SpeechSynthesisEvent",
|
||||
"StorageEvent",
|
||||
"SyncEvent",
|
||||
"TextEvent",
|
||||
"TrackEvent",
|
||||
"TransitionEvent",
|
||||
"WebGLContextEvent",
|
||||
"WebKitAnimationEvent",
|
||||
"WebKitTransitionEvent",
|
||||
"WheelEvent"
|
||||
];
|
||||
someNonCreateableEvents.forEach(function (eventInterface) {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
var aliases = [
|
||||
["CustomEvent", "CustomEvent"],
|
||||
["Event", "Event"],
|
||||
["Events", "Event"],
|
||||
["HTMLEvents", "Event"],
|
||||
["KeyboardEvent", "KeyboardEvent"],
|
||||
["KeyEvents", "KeyboardEvent"],
|
||||
["MessageEvent", "MessageEvent"],
|
||||
["MouseEvent", "MouseEvent"],
|
||||
["MouseEvents", "MouseEvent"],
|
||||
["TouchEvent", "TouchEvent"],
|
||||
["UIEvent", "UIEvent"],
|
||||
["UIEvents", "UIEvent"]
|
||||
];
|
||||
var aliases = {
|
||||
"CustomEvent": "CustomEvent",
|
||||
"Event": "Event",
|
||||
"Events": "Event",
|
||||
"HTMLEvents": "Event",
|
||||
"KeyboardEvent": "KeyboardEvent",
|
||||
"MessageEvent": "MessageEvent",
|
||||
"MouseEvent": "MouseEvent",
|
||||
"MouseEvents": "MouseEvent",
|
||||
"TouchEvent": "TouchEvent",
|
||||
"UIEvent": "UIEvent",
|
||||
"UIEvents": "UIEvent"
|
||||
};
|
||||
|
|
|
@ -6,6 +6,7 @@ function attr_is(attr, v, ln, ns, p, n) {
|
|||
assert_equals(attr.namespaceURI, ns)
|
||||
assert_equals(attr.prefix, p)
|
||||
assert_equals(attr.name, n)
|
||||
assert_equals(attr.nodeName, n);
|
||||
assert_equals(attr.specified, true)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue