| Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html
|
| index 1d8595c7a4d3892f8dc6c30835c81cb2d8d7c810..62a3e202787537160b3e55124344c267633b81b7 100644
|
| --- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html
|
| @@ -72,33 +72,22 @@ test(function() {
|
| * interfaces that it is known some UA does or did not throw for.
|
| */
|
| var someNonCreateableEvents = [
|
| - "AnimationEvent",
|
| "AnimationPlayerEvent",
|
| "ApplicationCacheErrorEvent",
|
| "AudioProcessingEvent",
|
| "AutocompleteErrorEvent",
|
| "BeforeInstallPromptEvent",
|
| - "BeforeUnloadEvent",
|
| "BlobEvent",
|
| "ClipboardEvent",
|
| - "CloseEvent",
|
| "CommandEvent",
|
| - "CompositionEvent",
|
| "DataContainerEvent",
|
| "DeviceLightEvent",
|
| - "DeviceMotionEvent",
|
| - "DeviceOrientationEvent",
|
| - "DragEvent",
|
| - "ErrorEvent",
|
| "ExtendableEvent",
|
| "ExtendableMessageEvent",
|
| "FetchEvent",
|
| - "FocusEvent",
|
| "FontFaceSetLoadEvent",
|
| "GamepadEvent",
|
| "GeofencingEvent",
|
| - "HashChangeEvent",
|
| - "IDBVersionChangeEvent",
|
| "InstallEvent",
|
| "KeyEvent",
|
| "MIDIConnectionEvent",
|
| @@ -116,13 +105,10 @@ var someNonCreateableEvents = [
|
| "OfflineAudioCompletionEvent",
|
| "OrientationEvent",
|
| "PageTransition", // Yes, with no "Event"
|
| - "PageTransitionEvent",
|
| "PointerEvent",
|
| - "PopStateEvent",
|
| "PopUpEvent",
|
| "PresentationConnectionAvailableEvent",
|
| "PresentationConnectionCloseEvent",
|
| - "ProgressEvent",
|
| "PromiseRejectionEvent",
|
| "PushEvent",
|
| "RTCDTMFToneChangeEvent",
|
| @@ -131,7 +117,6 @@ var someNonCreateableEvents = [
|
| "RelatedEvent",
|
| "ResourceProgressEvent",
|
| "SVGEvent",
|
| - "SVGZoomEvent",
|
| "ScrollAreaEvent",
|
| "SecurityPolicyViolationEvent",
|
| "ServicePortConnectEvent",
|
| @@ -140,29 +125,29 @@ var someNonCreateableEvents = [
|
| "SpeechRecognitionError",
|
| "SpeechRecognitionEvent",
|
| "SpeechSynthesisEvent",
|
| - "StorageEvent",
|
| "SyncEvent",
|
| - "TextEvent",
|
| "TimeEvent",
|
| - "TrackEvent",
|
| - "TransitionEvent",
|
| - "WebGLContextEvent",
|
| "WebKitAnimationEvent",
|
| "WebKitTransitionEvent",
|
| - "WheelEvent",
|
| "XULCommandEvent",
|
| ];
|
| 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 + '"');
|
| + // SVGEvents is allowed, but not SVGEvent. Make sure we only test if it's
|
| + // not whitelisted.
|
| + if (!(eventInterface in aliases)) {
|
| + 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 + 's"');
|
| + if (!(eventInterface + "s" in aliases)) {
|
| + 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 + 's"');
|
| + }
|
| });
|
| </script>
|
|
|