diff --git a/browser/base/content/test/performance/browser_appmenu_reflows.js b/browser/base/content/test/performance/browser_appmenu_reflows.js index 0ebd0a218825..253f7fb891a7 100644 --- a/browser/base/content/test/performance/browser_appmenu_reflows.js +++ b/browser/base/content/test/performance/browser_appmenu_reflows.js @@ -17,18 +17,6 @@ const EXPECTED_APPMENU_OPEN_REFLOWS = [ ], }, - { - stack: [ - "get_alignmentPosition@chrome://global/content/bindings/popup.xml", - "adjustArrowPosition@chrome://global/content/bindings/popup.xml", - "onxblpopupshowing@chrome://global/content/bindings/popup.xml", - "openPopup@chrome://global/content/bindings/popup.xml", - "show/ { panel.moveToAnchor(anchor, "after_end", 20, 0); }, + () => { + // the anchor and the panel should have moved 20px right without flipping. + isArrowPositionedOn("right", 20); + waitForPopupPositioned( + () => { panel.moveToAnchor(anchor, "after_end", -20, 0); }, + () => { + // the anchor and the panel should have moved 20px left without flipping. + isArrowPositionedOn("right", -20); + next(); + }); + }); }); }], ['simpleMoveToAnchorVertical', 'middle', function(next) { openPopup("start_after", function() { isArrowPositionedOn("bottom"); - panel.moveToAnchor(anchor, "start_after", 0, 20); - // the anchor and the panel should have moved 20px down without flipping. - isArrowPositionedOn("bottom", 20); - panel.moveToAnchor(anchor, "start_after", 0, -20); - // the anchor and the panel should have moved 20px up without flipping. - isArrowPositionedOn("bottom", -20); - next(); + waitForPopupPositioned( + () => { panel.moveToAnchor(anchor, "start_after", 0, 20); }, + () => { + // the anchor and the panel should have moved 20px down without flipping. + isArrowPositionedOn("bottom", 20); + waitForPopupPositioned( + () => { panel.moveToAnchor(anchor, "start_after", 0, -20) }, + () => { + // the anchor and the panel should have moved 20px up without flipping. + isArrowPositionedOn("bottom", -20); + next(); + }); + }); }); }], diff --git a/toolkit/content/tests/widgets/test_popupreflows.xul b/toolkit/content/tests/widgets/test_popupreflows.xul index 817a43bbea7b..08aa2a3c7baa 100644 --- a/toolkit/content/tests/widgets/test_popupreflows.xul +++ b/toolkit/content/tests/widgets/test_popupreflows.xul @@ -100,7 +100,7 @@ addEventListener("load", function() { arrow.style.transition = "none"; // and off we go... - countReflows(testSimplePanel, 1).then(SimpleTest.finish); + countReflows(testSimplePanel, 0).then(SimpleTest.finish); }); ]]> diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.xml index 67d69b4a11d7..38fbf41841b7 100644 --- a/toolkit/content/widgets/popup.xml +++ b/toolkit/content/widgets/popup.xml @@ -492,8 +492,6 @@ document.getAnonymousElementByAttribute(this, "anonid", "arrowbox") .style.removeProperty("transform"); - this.adjustArrowPosition(); - if (this.getAttribute("animate") != "false") { this.setAttribute("animate", "open"); // the animating attribute prevents user interaction during transition