Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent.html

Issue 1923043002: Import web-platform-tests@028d354aba4c8ee6700def957a45f3927241d8b0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix expectations after the test harness was updated Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698