Bug 1275856 - Update dom event tests to reflect removal of RecorderErrorEvent and new MediaRecorderErrorEvent. r?smaug draft
authorBryce Van Dyk <bvandyk@mozilla.com>
Fri, 11 Aug 2017 14:03:23 +1200
changeset 645248 0df259aeab4896a708e5a0f9604e3fdde9e93600
parent 645247 db9ea301dbcf1eaf43002e608ab83e577c0ed75a
child 645249 d3ccd1c5e301cde76bbc3181757105581c4998ce
push id73717
push userbvandyk@mozilla.com
push dateSat, 12 Aug 2017 02:47:44 +0000
reviewerssmaug
bugs1275856
milestone57.0a1
Bug 1275856 - Update dom event tests to reflect removal of RecorderErrorEvent and new MediaRecorderErrorEvent. r?smaug MozReview-Commit-ID: 52YJMJncLyM
dom/events/test/test_all_synthetic_events.html
dom/tests/mochitest/general/test_interfaces.js
--- a/dom/events/test/test_all_synthetic_events.html
+++ b/dom/events/test/test_all_synthetic_events.html
@@ -180,16 +180,21 @@ const kEventConstructors = {
                                                            message: new ArrayBuffer(0)
                                                          });
                                                        },
                                              },
   MediaQueryListEvent:                       { create: function (aName, aProps) {
                                                          return new MediaQueryListEvent(aName, aProps);
                                                        },
                                              },
+  MediaRecorderErrorEvent:                   { create: function (aName, aProps) {
+                                                         aProps.error = new DOMException();
+                                                         return new MediaRecorderErrorEvent(aName, aProps);
+                                                       },
+                                             },
   MediaStreamEvent:                          { create: function (aName, aProps) {
                                                          return new MediaStreamEvent(aName, aProps);
                                                        },
                                              },
   MediaStreamTrackEvent:                     {
                                                // Difficult to test required arguments.
                                              },
   MessageEvent:                              { create: function (aName, aProps) {
@@ -282,20 +287,16 @@ const kEventConstructors = {
   PopupBlockedEvent:                         { create: function (aName, aProps) {
                                                          return new PopupBlockedEvent(aName, aProps);
                                                        },
                                              },
   ProgressEvent:                             { create: function (aName, aProps) {
                                                          return new ProgressEvent(aName, aProps);
                                                        },
                                              },
-  RecordErrorEvent:                          { create: function (aName, aProps) {
-                                                         return new RecordErrorEvent(aName, aProps);
-                                                       },
-                                             },
   RTCDataChannelEvent:                       { create: function (aName, aProps) {
                                                          return new RTCDataChannelEvent(aName, aProps);
                                                        },
                                              },
   RTCDTMFToneChangeEvent:                       { create: function (aName, aProps) {
                                                          return new RTCDTMFToneChangeEvent(aName, aProps);
                                                        },
                                              },
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -636,16 +636,18 @@ var interfaceNamesInGlobalScope =
     "MediaList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaQueryList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaQueryListEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaRecorder",
 // IMPORTANT: Do not change this list without review from a DOM peer!
+    "MediaRecorderErrorEvent",
+// IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaSource",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaStream",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaStreamAudioDestinationNode",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MediaStreamAudioSourceNode",
 // IMPORTANT: Do not change this list without review from a DOM peer!
@@ -782,18 +784,16 @@ var interfaceNamesInGlobalScope =
     "PushSubscription",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "PushSubscriptionOptions",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "RadioNodeList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Range",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "RecordErrorEvent",
-// IMPORTANT: Do not change this list without review from a DOM peer!
     "Rect",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Request",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Response",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "RGBColor",
 // IMPORTANT: Do not change this list without review from a DOM peer!