Bug 1336806 - Disable animation of the bookmark popup panel during tests to aid timing and avoid intermittent issues. r=mak
authorMark Banner <standard8@mozilla.com>
Tue, 18 Jul 2017 19:23:20 +0100
changeset 418349 b3fae55d844b385f959661a85874ec15db5f87e2
parent 418348 78b6e9cdaaa928409000c2c9bffc96f9edf2f883
child 418350 b940bc3aab4891b2180ec757d04646a5500e0a06
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1336806
milestone56.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 1336806 - Disable animation of the bookmark popup panel during tests to aid timing and avoid intermittent issues. r=mak MozReview-Commit-ID: 115vkHVSEUm
browser/base/content/test/general/browser_bookmark_popup.js
--- a/browser/base/content/test/general/browser_bookmark_popup.js
+++ b/browser/base/content/test/general/browser_bookmark_popup.js
@@ -10,16 +10,23 @@
 
 let bookmarkPanel = document.getElementById("editBookmarkPanel");
 let bookmarkStar = AppConstants.MOZ_PHOTON_THEME ? BookmarkingUI.star : BookmarkingUI.button;
 let bookmarkPanelTitle = document.getElementById("editBookmarkPanelTitle");
 let editBookmarkPanelRemoveButtonRect;
 
 StarUI._closePanelQuickForTesting = true;
 
+add_task(async function setup() {
+  bookmarkPanel.setAttribute("animate", false);
+  registerCleanupFunction(() => {
+    bookmarkPanel.removeAttribute("animate");
+  });
+})
+
 async function test_bookmarks_popup({isNewBookmark, popupShowFn, popupEditFn,
                                 shouldAutoClose, popupHideFn, isBookmarkRemoved}) {
   await BrowserTestUtils.withNewTab({gBrowser, url: "about:home"}, async function(browser) {
     try {
       if (!isNewBookmark) {
         await PlacesUtils.bookmarks.insert({
           parentGuid: PlacesUtils.bookmarks.unfiledGuid,
           url: "about:home",
@@ -377,17 +384,17 @@ add_task(async function enter_on_remove_
 add_task(async function mouse_hovering_panel_should_prevent_autoclose() {
   if (AppConstants.platform != "win") {
     // This test requires synthesizing native mouse movement which is
     // best supported on Windows.
     return;
   }
   await test_bookmarks_popup({
     isNewBookmark: true,
-    async popupShowFn(browser) {
+    async popupShowFn() {
       await new Promise(resolve => {
         EventUtils.synthesizeNativeMouseMove(
           document.documentElement,
           editBookmarkPanelRemoveButtonRect.left,
           editBookmarkPanelRemoveButtonRect.top,
           resolve);
       });
       EventUtils.synthesizeKey("D", {accelKey: true}, window);