Skip to content
Snippets Groups Projects
Commit 86e507bf authored by Erica Wright's avatar Erica Wright
Browse files

Bug 1406191 - Cleanup browser_widget_animation.js, remove event listener and...

Bug 1406191 - Cleanup browser_widget_animation.js, remove event listener and close panel correctly. r=johannh

MozReview-Commit-ID: 6IjrdxnWPqa

--HG--
extra : rebase_source : 5b52caffa1d523964ee485859dd562919f5f971a
parent ac9aa821
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ function promiseOverflowAnimationEnd() {
let overflowButton = document.getElementById("nav-bar-overflow-button");
overflowButton.addEventListener("animationend", function cleanupOverflowAnimationOut(event) {
if (event.animationName == "overflow-fade") {
overflowButton.removeEventListener("transitionend", cleanupOverflowAnimationOut);
overflowButton.removeEventListener("animationend", cleanupOverflowAnimationOut);
ok(true, "The overflow button`s animationend event should have happened");
resolve();
}
......@@ -44,10 +44,8 @@ add_task(async function() {
EventUtils.synthesizeMouseAtCenter(homeButton, {type: "contextmenu", button: 2 });
await shownPromise;
let moveToPanel = contextMenu.querySelector(".customize-context-moveToPanel");
if (moveToPanel) {
moveToPanel.click();
}
contextMenu.querySelector(".customize-context-moveToPanel").click();
await contextMenu.hidePopup();
await Promise.all([promiseWidgetAnimationOut(homeButton), promiseOverflowAnimationEnd()]);
ok(true, "The widget and overflow animations should have both happened.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment