Bug 1484845 - Fix test verification failure by focusing an element consistently before synthesizing keys. r=mixedpuppy
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 21 Aug 2018 14:23:42 +0100
changeset 487693 ebcdf2f8e40caa2dc71786df08c9316b4578bb32
parent 487692 5b802b94d59fbe606a9cd45c06b1f28febcbc242
child 487694 1b533762e9cb4faf2b1c2d9fa58418c71dd9729d
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1484845
milestone63.0a1
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
Bug 1484845 - Fix test verification failure by focusing an element consistently before synthesizing keys. r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D3878
browser/base/content/test/sidebar/browser_sidebar_keys.js
--- a/browser/base/content/test/sidebar/browser_sidebar_keys.js
+++ b/browser/base/content/test/sidebar/browser_sidebar_keys.js
@@ -1,12 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 async function testSidebarKeyToggle(key, options, expectedSidebarId) {
+  EventUtils.synthesizeMouseAtCenter(gURLBar, {});
   let promiseShown = BrowserTestUtils.waitForEvent(window, "SidebarShown");
   EventUtils.synthesizeKey(key, options);
   await promiseShown;
   Assert.equal(document.getElementById("sidebar-box")
                        .getAttribute("sidebarcommand"), expectedSidebarId);
   EventUtils.synthesizeKey(key, options);
   Assert.ok(!SidebarUI.isOpen);
 }