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

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

Issue 1899623002: Import latest web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle new failures 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 20137d8789d0a6c80f280be22708d767bec90dec..1d8595c7a4d3892f8dc6c30835c81cb2d8d7c810 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
@@ -39,7 +39,7 @@ for (var alias in aliases) {
testAlias(alias.toLowerCase(), iface);
testAlias(alias.toUpperCase(), iface);
- if (!alias.endsWith("s")) {
+ if (alias[alias.length - 1] != "s") {
var plural = alias + "s";
if (!(plural in aliases)) {
test(function () {
@@ -66,11 +66,11 @@ test(function() {
}, "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.
-*/
+ * 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, but includes all
+ * interfaces that it is known some UA does or did not throw for.
+ */
var someNonCreateableEvents = [
"AnimationEvent",
"AnimationPlayerEvent",
@@ -82,7 +82,9 @@ var someNonCreateableEvents = [
"BlobEvent",
"ClipboardEvent",
"CloseEvent",
+ "CommandEvent",
"CompositionEvent",
+ "DataContainerEvent",
"DeviceLightEvent",
"DeviceMotionEvent",
"DeviceOrientationEvent",
@@ -107,13 +109,17 @@ var someNonCreateableEvents = [
"MediaQueryListEvent",
"MediaStreamEvent",
"MediaStreamTrackEvent",
+ "MouseScrollEvent",
"MutationEvent",
"NotificationEvent",
+ "NotifyPaintEvent",
"OfflineAudioCompletionEvent",
"OrientationEvent",
+ "PageTransition", // Yes, with no "Event"
"PageTransitionEvent",
"PointerEvent",
"PopStateEvent",
+ "PopUpEvent",
"PresentationConnectionAvailableEvent",
"PresentationConnectionCloseEvent",
"ProgressEvent",
@@ -126,21 +132,25 @@ var someNonCreateableEvents = [
"ResourceProgressEvent",
"SVGEvent",
"SVGZoomEvent",
+ "ScrollAreaEvent",
"SecurityPolicyViolationEvent",
"ServicePortConnectEvent",
"ServiceWorkerMessageEvent",
+ "SimpleGestureEvent",
"SpeechRecognitionError",
"SpeechRecognitionEvent",
"SpeechSynthesisEvent",
"StorageEvent",
"SyncEvent",
"TextEvent",
+ "TimeEvent",
"TrackEvent",
"TransitionEvent",
"WebGLContextEvent",
"WebKitAnimationEvent",
"WebKitTransitionEvent",
- "WheelEvent"
+ "WheelEvent",
+ "XULCommandEvent",
];
someNonCreateableEvents.forEach(function (eventInterface) {
test(function () {
@@ -153,6 +163,6 @@ someNonCreateableEvents.forEach(function (eventInterface) {
assert_throws("NOT_SUPPORTED_ERR", function () {
var evt = document.createEvent(eventInterface + "s");
});
- }, 'Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "' + eventInterface + '"');
+ }, 'Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "' + eventInterface + 's"');
});
</script>

Powered by Google App Engine
This is Rietveld 408576698