Bug 1562205 - Enable selectionchange on inputs for test browser_input_dispatchKeyEvent.js FIREFOX_BETA_69_BASE
authorJulian Descottes <jdescottes@mozilla.com>
Sun, 30 Jun 2019 15:17:38 +0000
changeset 543567 adc59d50adf815ad6764ff235f833a5ba74291b6
parent 543566 5084ca5c7896332f3369f7a0bcfa5e04b46c5efc
child 543568 7573050ba145afe5c0f9fcb28f5fead5e240cba9
child 543580 1582b3ffe71226af68979a58b5852afa49ff939b
child 543601 3780202d7104307ec4c5f4a1dde788e5123c47ac
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1562205
milestone69.0a1
first release with
nightly linux32
adc59d50adf8 / 69.0a1 / 20190630214222 / files
nightly linux64
adc59d50adf8 / 69.0a1 / 20190630214222 / files
nightly mac
adc59d50adf8 / 69.0a1 / 20190630214222 / files
nightly win32
adc59d50adf8 / 69.0a1 / 20190630214222 / files
nightly win64
adc59d50adf8 / 69.0a1 / 20190630214222 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562205 - Enable selectionchange on inputs for test browser_input_dispatchKeyEvent.js The test was relying on selectionchange events fired on an input text element. This event is behind a pref, flip the pref to true during the test in order to make it pass on all channels Differential Revision: https://phabricator.services.mozilla.com/D36330
remote/test/browser/browser_input_dispatchKeyEvent.js
--- a/remote/test/browser/browser_input_dispatchKeyEvent.js
+++ b/remote/test/browser/browser_input_dispatchKeyEvent.js
@@ -21,16 +21,27 @@ const KEYCODES = {
 // Modifier for move forward shortcut is CTRL+RightArrow on Linux/Windows, ALT+RightArrow
 // on Mac.
 const isMac = Services.appinfo.OS === "Darwin";
 const ALT_MODIFIER = 1;
 const CTRL_MODIFIER = 2;
 const ARROW_MODIFIER = isMac ? ALT_MODIFIER : CTRL_MODIFIER;
 
 add_task(async function() {
+  // The selectionchange event was flagged behind dom.select_events.textcontrols.enabled,
+  // which is only true on Nightly and Local builds. Force the pref to true so that
+  // the test passes on all channels. See Bug 1309628 for more details.
+  info("Enable selectionchange events on input elements");
+  await new Promise(resolve => {
+    const options = {
+      set: [["dom.select_events.textcontrols.enabled", true]],
+    };
+    SpecialPowers.pushPrefEnv(options, resolve);
+  });
+
   const { client, tab } = await setupTestForUri(TEST_URI);
   is(gBrowser.selectedTab, tab, "Selected tab is the target tab");
 
   const { Input } = client;
 
   info("Focus the input on the page");
   await ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
     const input = content.document.querySelector("input");