Bug 1388119 - Drop support for createEvent("ErrorEvent"/"PopStateEvent"); r?smaug draft
authorAryeh Gregor <ayg@aryeh.name>
Mon, 07 Aug 2017 21:19:59 +0300
changeset 642520 bc7dc8defbc0a52ef8d09543f1f52259a8234816
parent 619581 52285ea5e54c73d3ed824544cef2ee3f195f05e6
child 642525 da347ff2196d114e682efc62f646c96691993d30
push id72783
push userbmo:ayg@aryeh.name
push dateTue, 08 Aug 2017 11:39:24 +0000
reviewerssmaug
bugs1388119
milestone57.0a1
Bug 1388119 - Drop support for createEvent("ErrorEvent"/"PopStateEvent"); r?smaug They were just dropped from the spec: https://github.com/whatwg/dom/issues/362 https://github.com/whatwg/dom/pull/489 ErrorEvent we never supported anyway until it was added recently to match the spec. PopStateEvent is not supported by WebKit, Blink is planning to try dropping support, our telemetry shows usage is basically zero, and we never supported any way to initialize it anyway. The changes to Document-createEvent.html and Document-createEvent.js are taken from upstream. The other wpt changes are new in this commit. MozReview-Commit-ID: A6GzhLwL08l
dom/events/EventDispatcher.cpp
dom/events/test/test_bug517851.html
testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
testing/web-platform/tests/dom/nodes/Document-createEvent.html
testing/web-platform/tests/dom/nodes/Document-createEvent.js
testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html
testing/web-platform/tests/workers/Worker_dispatchEvent_ErrorEvent.htm
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -20,28 +20,26 @@
 #include "DeviceMotionEvent.h"
 #include "DragEvent.h"
 #include "GeckoProfiler.h"
 #include "KeyboardEvent.h"
 #include "mozilla/ContentEvents.h"
 #include "mozilla/dom/CloseEvent.h"
 #include "mozilla/dom/CustomEvent.h"
 #include "mozilla/dom/DeviceOrientationEvent.h"
-#include "mozilla/dom/ErrorEvent.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/FocusEvent.h"
 #include "mozilla/dom/HashChangeEvent.h"
 #include "mozilla/dom/InputEvent.h"
 #include "mozilla/dom/MessageEvent.h"
 #include "mozilla/dom/MouseScrollEvent.h"
 #include "mozilla/dom/MutationEvent.h"
 #include "mozilla/dom/NotifyPaintEvent.h"
 #include "mozilla/dom/PageTransitionEvent.h"
 #include "mozilla/dom/PointerEvent.h"
-#include "mozilla/dom/PopStateEvent.h"
 #include "mozilla/dom/RootedDictionary.h"
 #include "mozilla/dom/ScrollAreaEvent.h"
 #include "mozilla/dom/SimpleGestureEvent.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/StorageEvent.h"
 #include "mozilla/dom/TimeEvent.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "mozilla/dom/TransitionEvent.h"
@@ -1057,28 +1055,16 @@ EventDispatcher::CreateEvent(EventTarget
   if (aEventType.LowerCaseEqualsLiteral("beforeunloadevent")) {
     LOG_EVENT_CREATION(BEFOREUNLOADEVENT);
     return NS_NewDOMBeforeUnloadEvent(aOwner, aPresContext, nullptr);
   }
   if (aEventType.LowerCaseEqualsLiteral("scrollareaevent")) {
     LOG_EVENT_CREATION(SCROLLAREAEVENT);
     return NS_NewDOMScrollAreaEvent(aOwner, aPresContext, nullptr);
   }
-  // XXXkhuey Chrome supports popstateevent here, even though it provides no
-  // initPopStateEvent method.  This is nuts ... but copying it is unlikely to
-  // break the web.
-  if (aEventType.LowerCaseEqualsLiteral("popstateevent")) {
-    LOG_EVENT_CREATION(POPSTATEEVENT);
-    AutoJSContext cx;
-    RootedDictionary<PopStateEventInit> init(cx);
-    RefPtr<Event> event =
-      PopStateEvent::Constructor(aOwner, EmptyString(), init);
-    event->MarkUninitialized();
-    return event.forget();
-  }
   if (aEventType.LowerCaseEqualsLiteral("touchevent") &&
       TouchEvent::PrefEnabled(nsContentUtils::GetDocShellForEventTarget(aOwner))) {
     LOG_EVENT_CREATION(TOUCHEVENT);
     return NS_NewDOMTouchEvent(aOwner, aPresContext, nullptr);
   }
   if (aEventType.LowerCaseEqualsLiteral("hashchangeevent")) {
     LOG_EVENT_CREATION(HASHCHANGEEVENT);
     HashChangeEventInit init;
@@ -1093,24 +1079,16 @@ EventDispatcher::CreateEvent(EventTarget
   }
   if (aEventType.LowerCaseEqualsLiteral("storageevent")) {
     LOG_EVENT_CREATION(STORAGEEVENT);
     RefPtr<Event> event =
       StorageEvent::Constructor(aOwner, EmptyString(), StorageEventInit());
     event->MarkUninitialized();
     return event.forget();
   }
-  if (aEventType.LowerCaseEqualsLiteral("errorevent")) {
-    LOG_EVENT_CREATION(ERROREVENT);
-    RootedDictionary<ErrorEventInit> init(RootingCx());
-    RefPtr<Event> event =
-      ErrorEvent::Constructor(aOwner, EmptyString(), init);
-    event->MarkUninitialized();
-    return event.forget();
-  }
 
   // Only allow these events for chrome
   if (aCallerType == CallerType::System) {
     if (aEventType.LowerCaseEqualsLiteral("simplegestureevent")) {
       return NS_NewDOMSimpleGestureEvent(aOwner, aPresContext, nullptr);
     }
     if (aEventType.LowerCaseEqualsLiteral("xulcommandevent")) {
       LOG_EVENT_CREATION(XULCOMMANDEVENT);
--- a/dom/events/test/test_bug517851.html
+++ b/dom/events/test/test_bug517851.html
@@ -27,29 +27,27 @@ var target = document.createElement("div
 var target2 = $("subframe").contentDocument.body;
 target.setAttribute("onerror", "++window.handledCount; return window.testReturnValue;");
 target2.setAttribute("onerror", "++window.parent.handledCount; return window.parent.testReturnValue;");
 target.setAttribute("onmouseover", "++window.handledCount; return window.testReturnValue;");
 target.setAttribute("onbeforeunload", "++window.handledCount; return window.testReturnValue;");
 target2.setAttribute("onbeforeunload", "++window.parent.handledCount; return window.parent.testReturnValue;");
 target.setAttribute("onmousemove", "++window.handledCount; return window.testReturnValue;");                     
 
-var e = document.createEvent("ErrorEvent");
-e.initEvent("error", true, true);
+var e = new ErrorEvent("error", {bubbles: true, cancelable: true});
 window.testReturnValue = true;
 is(target.dispatchEvent(e), window.testReturnValue,
    "error event should not have reverse return value handling on div!");
 is(handledCount, 1, "Wrong event count!");
 window.testReturnValue = false;
 is(target.dispatchEvent(e), window.testReturnValue,
    "error event should not have reverse return value handling on div (2)!");
 is(handledCount, 2, "Wrong event count!");
 
-var e = document.createEvent("ErrorEvent");
-e.initEvent("error", true, true);
+var e = new ErrorEvent("error", {bubbles: true, cancelable: true});
 window.testReturnValue = false;
 is(target2.dispatchEvent(e), !window.testReturnValue,
    "error event should have reverse return value handling!");
 is(handledCount, 3, "Wrong event count!");
 window.testReturnValue = true;
 is(target2.dispatchEvent(e), !window.testReturnValue,
    "error event should have reverse return value handling (2)!");
 is(handledCount, 4, "Wrong event count!");
--- a/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
+++ b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
@@ -1,50 +1,6 @@
 [EventTarget-dispatchEvent.html]
   type: testharness
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (AnimationEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (CloseEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
   [If the event's initialized flag is not set, an InvalidStateError must be thrown (FocusEvent).]
     expected: FAIL
     bug: https://github.com/whatwg/dom/issues/362, 1314303
 
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (IDBVersionChangeEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (PageTransitionEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (ProgressEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (SVGZoomEvent).]
-    expected: FAIL
-    bug: 1314388
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (SVGZoomEvents).]
-    expected: FAIL
-    bug: 1314388
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (TrackEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (TransitionEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (WebGLContextEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [If the event's initialized flag is not set, an InvalidStateError must be thrown (WheelEvent).]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
--- a/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
+++ b/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
@@ -1,58 +1,10 @@
 [Document-createEvent.html]
   type: testharness
-  [AnimationEvent should be an alias for AnimationEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('AnimationEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [animationevent should be an alias for AnimationEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('animationevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [ANIMATIONEVENT should be an alias for AnimationEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('ANIMATIONEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [CloseEvent should be an alias for CloseEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('CloseEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [closeevent should be an alias for CloseEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('closeevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [CLOSEEVENT should be an alias for CloseEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('CLOSEEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
   [FocusEvent should be an alias for FocusEvent.]
     expected: FAIL
     bug: https://github.com/whatwg/dom/issues/362, 1314303
 
   [createEvent('FocusEvent') should be initialized correctly.]
     expected: FAIL
     bug: https://github.com/whatwg/dom/issues/362, 1314303
 
@@ -67,184 +19,16 @@
   [FOCUSEVENT should be an alias for FocusEvent.]
     expected: FAIL
     bug: https://github.com/whatwg/dom/issues/362, 1314303
 
   [createEvent('FOCUSEVENT') should be initialized correctly.]
     expected: FAIL
     bug: https://github.com/whatwg/dom/issues/362, 1314303
 
-  [IDBVersionChangeEvent should be an alias for IDBVersionChangeEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('IDBVersionChangeEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [idbversionchangeevent should be an alias for IDBVersionChangeEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('idbversionchangeevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [IDBVERSIONCHANGEEVENT should be an alias for IDBVersionChangeEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('IDBVERSIONCHANGEEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [PageTransitionEvent should be an alias for PageTransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('PageTransitionEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [pagetransitionevent should be an alias for PageTransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('pagetransitionevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [PAGETRANSITIONEVENT should be an alias for PageTransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('PAGETRANSITIONEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [ProgressEvent should be an alias for ProgressEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('ProgressEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [progressevent should be an alias for ProgressEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('progressevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [PROGRESSEVENT should be an alias for ProgressEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('PROGRESSEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [TrackEvent should be an alias for TrackEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('TrackEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [trackevent should be an alias for TrackEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('trackevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [TRACKEVENT should be an alias for TrackEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('TRACKEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [TransitionEvent should be an alias for TransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('TransitionEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [transitionevent should be an alias for TransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('transitionevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [TRANSITIONEVENT should be an alias for TransitionEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('TRANSITIONEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [WebGLContextEvent should be an alias for WebGLContextEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('WebGLContextEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [webglcontextevent should be an alias for WebGLContextEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('webglcontextevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [WEBGLCONTEXTEVENT should be an alias for WebGLContextEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('WEBGLCONTEXTEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [WheelEvent should be an alias for WheelEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('WheelEvent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [wheelevent should be an alias for WheelEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('wheelevent') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [WHEELEVENT should be an alias for WheelEvent.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
-  [createEvent('WHEELEVENT') should be initialized correctly.]
-    expected: FAIL
-    bug: https://github.com/whatwg/dom/issues/362, 1314303
-
   [Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "KeyEvents"]
     expected: FAIL
     bug: 1251198
 
   [Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "MouseScrollEvents"]
     expected: FAIL
     bug: 1251198
 
--- a/testing/web-platform/tests/dom/nodes/Document-createEvent.html
+++ b/testing/web-platform/tests/dom/nodes/Document-createEvent.html
@@ -66,32 +66,36 @@ test(function() {
 
 /*
  * 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",
   "AnimationPlaybackEvent",
   "AnimationPlayerEvent",
   "ApplicationCacheErrorEvent",
   "AudioProcessingEvent",
   "AutocompleteErrorEvent",
   "BeforeInstallPromptEvent",
   "BlobEvent",
   "ClipboardEvent",
+  "CloseEvent",
   "CommandEvent",
   "DataContainerEvent",
+  "ErrorEvent",
   "ExtendableEvent",
   "ExtendableMessageEvent",
   "FetchEvent",
   "FontFaceSetLoadEvent",
   "GamepadEvent",
   "GeofencingEvent",
+  "IDBVersionChangeEvent",
   "InstallEvent",
   "KeyEvent",
   "MIDIConnectionEvent",
   "MIDIMessageEvent",
   "MediaEncryptedEvent",
   "MediaKeyEvent",
   "MediaKeyMessageEvent",
   "MediaQueryListEvent",
@@ -99,17 +103,19 @@ var someNonCreateableEvents = [
   "MediaStreamTrackEvent",
   "MouseScrollEvent",
   "MutationEvent",
   "NotificationEvent",
   "NotifyPaintEvent",
   "OfflineAudioCompletionEvent",
   "OrientationEvent",
   "PageTransition", // Yes, with no "Event"
+  "PageTransitionEvent",
   "PointerEvent",
+  "PopStateEvent",
   "PopUpEvent",
   "PresentationConnectionAvailableEvent",
   "PresentationConnectionCloseEvent",
   "ProgressEvent",
   "PromiseRejectionEvent",
   "PushEvent",
   "RTCDTMFToneChangeEvent",
   "RTCDataChannelEvent",
@@ -123,18 +129,22 @@ var someNonCreateableEvents = [
   "ServicePortConnectEvent",
   "ServiceWorkerMessageEvent",
   "SimpleGestureEvent",
   "SpeechRecognitionError",
   "SpeechRecognitionEvent",
   "SpeechSynthesisEvent",
   "SyncEvent",
   "TimeEvent",
+  "TrackEvent",
+  "TransitionEvent",
+  "WebGLContextEvent",
   "WebKitAnimationEvent",
   "WebKitTransitionEvent",
+  "WheelEvent",
   "XULCommandEvent",
 ];
 someNonCreateableEvents.forEach(function (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 () {
--- a/testing/web-platform/tests/dom/nodes/Document-createEvent.js
+++ b/testing/web-platform/tests/dom/nodes/Document-createEvent.js
@@ -1,33 +1,23 @@
 var aliases = {
-  "AnimationEvent": "AnimationEvent",
   "BeforeUnloadEvent": "BeforeUnloadEvent",
-  "CloseEvent": "CloseEvent",
   "CompositionEvent": "CompositionEvent",
   "CustomEvent": "CustomEvent",
   "DeviceMotionEvent": "DeviceMotionEvent",
   "DeviceOrientationEvent": "DeviceOrientationEvent",
   "DragEvent": "DragEvent",
-  "ErrorEvent": "ErrorEvent",
   "Event": "Event",
   "Events": "Event",
   "FocusEvent": "FocusEvent",
   "HashChangeEvent": "HashChangeEvent",
   "HTMLEvents": "Event",
-  "IDBVersionChangeEvent": "IDBVersionChangeEvent",
   "KeyboardEvent": "KeyboardEvent",
   "MessageEvent": "MessageEvent",
   "MouseEvent": "MouseEvent",
   "MouseEvents": "MouseEvent",
-  "PageTransitionEvent": "PageTransitionEvent",
-  "PopStateEvent": "PopStateEvent",
   "StorageEvent": "StorageEvent",
   "SVGEvents": "Event",
   "TextEvent": "CompositionEvent",
   "TouchEvent": "TouchEvent",
-  "TrackEvent": "TrackEvent",
-  "TransitionEvent": "TransitionEvent",
   "UIEvent": "UIEvent",
   "UIEvents": "UIEvent",
-  "WebGLContextEvent": "WebGLContextEvent",
-  "WheelEvent": "WheelEvent",
 };
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html
@@ -1,22 +1,16 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Synthetic popstate events</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 test(function () {
-  var e = document.createEvent('PopStateEvent');
-  var eProto = Object.getPrototypeOf(e);
-  assert_equals(eProto, PopStateEvent.prototype);
-}, 'document.createEvent');
-
-test(function () {
   assert_false('initPopStateEvent' in PopStateEvent.prototype,
                'There should be no PopStateEvent#initPopStateEvent');
 }, 'initPopStateEvent');
 
 test(function () {
   var state = history.state;
   var data;
   window.addEventListener('popstate', function (e) {
--- a/testing/web-platform/tests/workers/Worker_dispatchEvent_ErrorEvent.htm
+++ b/testing/web-platform/tests/workers/Worker_dispatchEvent_ErrorEvent.htm
@@ -20,18 +20,12 @@ async_test(function(t) {
     assert_equals(e.colno, colno, 'colno');
     assert_equals(e.error, error, 'error');
   }), true);
   var e = new ErrorEvent(event, {bubbles:true, cancelable:true, message:message, filename:filename, lineno:lineno, colno:colno, error:error});
   worker.dispatchEvent(e);
 });
 
 test(function() {
-  var e = document.createEvent("ErrorEvent");
-  var eProto = Object.getPrototypeOf(e);
-  assert_equals(eProto, ErrorEvent.prototype);
-}, "document.createEvent('ErrorEvent')");
-
-test(function() {
   var e = new ErrorEvent("error");
   assert_false("initErrorEvent" in e, "should not be supported");
 }, "initErrorEvent");
 </script>