Open Bug 1269392 Opened 8 years ago Updated 2 years ago

browser_1007336_lwthemes_in_customize_mode.js intermittently fails when lwthemes menu isn't populated before popupshown event

Categories

(Firefox :: Toolbars and Customization, defect)

defect

Tracking

()

Tracking Status
firefox49 --- affected

People

(Reporter: jaws, Unassigned)

Details

From the test,

>   let popupShownPromise = popupShown(popup);
>   EventUtils.synthesizeMouseAtCenter(themesButton, {});
>   info("Clicked on themes button");
>   yield popupShownPromise;
> 
>   let header = document.getElementById("customization-lwtheme-menu-header");
>   let recommendedHeader = document.getElementById("customization-lwtheme-menu-recommended");
> 
>   is(header.nextSibling.nextSibling, recommendedHeader,
>      "There should only be one theme (default) in the 'My Themes' section by default");

The code under test uses onpopupshowing to populate the menu, but the onpopupshowing code calls AddonManager.getAddonByID to get the default theme as well as the suggested themes. This call is async and may not complete before onpopupshowing has returned.

I am able to reproduce this test failure locally (though intermittently) on my Linux Mint VM.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.