commit 30d773da5b3be12c46b6d99ba62aecdcf6b953a2 parent b9993390798f9df1e50e4025e012995452331478 Author: Mike Conley <mconley@mozilla.com> Date: Fri, 19 Dec 2025 18:41:47 +0000 Bug 2007037 - Update test_nimbus_newtabTrainhopAddon_firstStartup to be less flake-y on slower Windows systems. r=rpl Differential Revision: https://phabricator.services.mozilla.com/D277220 Diffstat:
| M | browser/components/newtab/test/xpcshell/test_nimbus_newtabTrainhopAddon_firstStartup.js | | | 18 | +++++++++++++++--- |
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/browser/components/newtab/test/xpcshell/test_nimbus_newtabTrainhopAddon_firstStartup.js b/browser/components/newtab/test/xpcshell/test_nimbus_newtabTrainhopAddon_firstStartup.js @@ -127,10 +127,22 @@ add_task( sandbox.restore(); - // Uninstall the force-installed train-hop add-on before cleanup - await addon.uninstall(); - await nimbusFeatureCleanup(); + info( + "Simulated browser restart while newtabTrainhopAddon nimbus feature is unenrolled" + ); + mockAboutNewTabUninit(); + await AddonTestUtils.promiseRestartManager(); + AboutNewTab.init(); + + // Expected bundled newtab resources mapping for this session. + assertNewTabResourceMapping(); + await AboutNewTabResourceMapping.updateTrainhopAddonState(); + await asyncAssertNewTabAddon({ + locationName: BUILTIN_LOCATION_NAME, + version: BUILTIN_ADDON_VERSION, + }); + assertTrainhopAddonVersionPref(""); Services.prefs.clearUserPref(PREF_CATEGORY_TASKS); }