Backed out changeset 3315610792f4 (bug 1550561) for mochitest failures at test_editor_for_input_with_autocomplete.html. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Fri, 10 May 2019 00:19:18 +0300
changeset 532124 e4eab914f8217b7eb04a311ad6f33bd4c7aca2ab
parent 532123 8784b7d0fcbf5c7f11af9da3cf3dd27662e8a429
child 532125 f06c7f8ed1f1ccdb87f35fd24e6bb53df5165c6e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1550561
milestone68.0a1
backs out3315610792f4b94ab15a102fa8119efec42f9a2e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 3315610792f4 (bug 1550561) for mochitest failures at test_editor_for_input_with_autocomplete.html. CLOSED TREE
toolkit/content/editMenuOverlay.js
toolkit/content/tests/chrome/file_edit_contextmenu.xul
toolkit/content/tests/chrome/test_edit_contextmenu.html
--- a/toolkit/content/editMenuOverlay.js
+++ b/toolkit/content/editMenuOverlay.js
@@ -59,17 +59,17 @@ window.addEventListener("DOMContentLoade
 }, { once: true });
 
 // Support context menus on html textareas in the parent process:
 window.addEventListener("contextmenu", (e) => {
   // Note that there's not a risk of e.target being XBL anonymous content for <textbox> (which manages
   // its own context menu), because e.target will be the XBL binding parent in that case.
   let needsContextMenu = e.target.ownerDocument == document &&
                          !e.defaultPrevented &&
-                         ["textarea", "input"].includes(e.target.localName) &&
+                         e.target.localName == "textarea" &&
                          e.target.namespaceURI == "http://www.w3.org/1999/xhtml";
 
   if (!needsContextMenu) {
     return;
   }
 
   let popup = document.getElementById("textbox-contextmenu");
   if (!popup) {
--- a/toolkit/content/tests/chrome/file_edit_contextmenu.xul
+++ b/toolkit/content/tests/chrome/file_edit_contextmenu.xul
@@ -19,10 +19,10 @@
   <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
   <command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
   <command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
   <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
   <command id="cmd_switchTextDirection" oncommand="goDoCommand('cmd_switchTextDirection');"/>
 </commandset>
 
 <html:textarea />
-<html:input />
+
 </window>
--- a/toolkit/content/tests/chrome/test_edit_contextmenu.html
+++ b/toolkit/content/tests/chrome/test_edit_contextmenu.html
@@ -9,63 +9,56 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
     const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
     SimpleTest.waitForExplicitFinish();
 
-    async function testElement(selector) {
+    async function runTest() {
       let win = window.open("file_edit_contextmenu.xul", "context-menu", "chrome,width=600,height=600");
       await new Promise(r => win.addEventListener("load", r, { once: true}));
       await SimpleTest.promiseFocus(win);
 
-      info("Testing " + selector);
-      let element = win.document.querySelector(selector);
-      ok(element, "element exists");
+      let textarea = win.document.querySelector("textarea");
+      ok(textarea, "textarea exists");
 
       info("Synthesizing a key so 'Undo' will be enabled");
-      element.focus();
+      textarea.focus();
       synthesizeKey("x", {}, win);
-      is(element.value, "x", "initial value");
+      is(textarea.value, "x", "initial value");
 
-      element.select();
+      textarea.select();
       synthesizeKey("c", { accelKey: true }, win); // copy to clipboard
       synthesizeKey("KEY_ArrowRight", {}, win); // drop selection to disable cut and copy context menu items
 
       win.document.addEventListener("contextmenu", (e) => {
         info("Calling prevent default on the first contextmenu event");
         e.preventDefault();
       }, { once: true });
-      synthesizeMouseAtCenter(element, {type: "contextmenu"}, win);
+      synthesizeMouseAtCenter(textarea, {type: "contextmenu"}, win);
       ok(!win.document.getElementById("textbox-contextmenu"), "contextmenu with preventDefault() doesn't run");
 
       let popupshown = new Promise(r => win.addEventListener("popupshown", r, { once: true }));
-      synthesizeMouseAtCenter(element, {type: "contextmenu"}, win);
+      synthesizeMouseAtCenter(textarea, {type: "contextmenu"}, win);
       let contextmenu = win.document.getElementById("textbox-contextmenu");
       ok(contextmenu, "context menu exists after right click");
       await popupshown;
 
       ok(!contextmenu.querySelector("[command=cmd_undo]").hasAttribute("disabled"), "undo enabled");
       ok(contextmenu.querySelector("[command=cmd_cut]").hasAttribute("disabled"), "cut disabled");
       ok(contextmenu.querySelector("[command=cmd_copy]").hasAttribute("disabled"), "copy disabled");
       ok(!contextmenu.querySelector("[command=cmd_paste]").hasAttribute("disabled"), "paste enabled");
       ok(contextmenu.querySelector("[command=cmd_delete]").hasAttribute("disabled"), "delete disabled");
       ok(!contextmenu.querySelector("[command=cmd_selectAll]").hasAttribute("disabled"), "select all enabled");
 
       contextmenu.querySelector("[command=cmd_undo]").click();
-      is(element.value, "", "undo worked");
-      win.close();
-    }
+      is(textarea.value, "", "undo worked");
 
-    async function runTest() {
-      for (let selector of ["textarea", "input"]) {
-        await testElement(selector);
-      }
       SimpleTest.finish();
     }
 
   </script>
 </head>
 <body onload="runTest()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1513343">Mozilla Bug 1513343</a>
 <p id="display"></p>