Backed out changeset bfc13d436dd4 (bug 1338328) for browser_context_menu_autocomplete_interaction.js failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Wed, 01 Mar 2017 15:38:21 -0800
changeset 374568 413a21e421dbeb4be715a5cd28967719ba5bd886
parent 374567 d64711bdb426e8dda8a2a0f54f17e410290c451e
child 374569 6de72f3b7f8abb27024a34faac7fbde24ee6ec8f
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1338328
milestone54.0a1
backs outbfc13d436dd486b917fb707f9648651efe5d35fb
Backed out changeset bfc13d436dd4 (bug 1338328) for browser_context_menu_autocomplete_interaction.js failures a=backout MozReview-Commit-ID: DfOAidZWnWF
dom/events/DataTransfer.cpp
dom/tests/mochitest/general/test_clipboard_events.html
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -676,17 +676,17 @@ DataTransfer::SetDataAtInternal(const ns
   if (aIndex > 0 &&
       (mEventMessage == eCut || mEventMessage == eCopy ||
        mEventMessage == ePaste)) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
 
   // Don't allow the custom type to be assigned.
   if (aFormat.EqualsLiteral(kCustomTypesMime)) {
-    return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
+    return NS_ERROR_TYPE_ERR;
   }
 
   if (!PrincipalMaySetData(aFormat, aData, aSubjectPrincipal)) {
     return NS_ERROR_DOM_SECURITY_ERR;
   }
 
   return SetDataWithPrincipal(aFormat, aData, aIndex, aSubjectPrincipal);
 }
--- a/dom/tests/mochitest/general/test_clipboard_events.html
+++ b/dom/tests/mochitest/general/test_clipboard_events.html
@@ -49,18 +49,17 @@ var testFunctions = [
   test_input_onpaste_abort,
   test_input_cut_dataTransfer,
   test_input_cut_abort_dataTransfer,
   test_input_copy_dataTransfer,
   test_input_paste_dataTransfer,
   test_input_paste_abort_dataTransfer,
   test_input_copypaste_dataTransfer_multiple,
   test_input_copy_button_dataTransfer,
-  test_eventspref_disabled,
-  test_input_cut_disallowed_types_dataTransfer,
+  test_eventspref_disabled
   ];
 
 function doTests()
 {
   // Init clipboard
   setClipboardText(clipboardInitialValue);
 
   // Reset value of contentInput.
@@ -672,45 +671,14 @@ function checkCachedDataTransfer(cd, eve
 
   var exh = false;
   try { cd.mozClearDataAt("text/plain", 0); } catch (ex) { exh = true; }
   ok(eventtype == "paste" ? exh : !exh, "exception occured clearing " + testprefix);
 
   is(getClipboardText(), "Some Clipboard Text", "clipboard not changed using " + testprefix);
 }
 
-function test_input_cut_disallowed_types_dataTransfer() {
-  selectContentInput();
-  let oncutExecuted = false;
-  contentInput.oncut = function(event) {
-    // Setting an arbitrary type should be OK
-    try {
-      event.clipboardData.setData("apple/cider", "Anything your heart desires");
-      ok(true, "We should have successfully executed the setData call");
-    } catch(e) {
-      ok(false, "We should not have gotten an exception for trying to set that data");
-    }
-
-    // Unless that type happens to be application/x-moz-custom-clipdata
-    try {
-      event.clipboardData.setData("application/x-moz-custom-clipdata", "Anything your heart desires");
-      ok(false, "We should not have successfully executed the setData call");
-    } catch(e) {
-      is(e.name, "NotSupportedError",
-         "We should have gotten an NotSupportedError exception for trying to set that data");
-    }
-    oncutExecuted = true;
-  };
-
-  try {
-    synthesizeKey("x", {accelKey: 1});
-    ok(oncutExecuted, "The oncut handler should have been executed");
-  } finally {
-    contentInput.oncut = null;
-  }
-}
-
 SimpleTest.waitForFocus(doTests);
 
 </script>
 </pre>
 </body>
 </html>