Closed Bug 2079939 Opened 1 month ago Closed 1 month ago

Turn off all New Tab widgets in automation with one pref

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox159 --- fixed
firefox160 --- fixed

People

(Reporter: maxx, Assigned: maxx)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [hnt][hnt-wattle])

Attachments

(2 external files)

Test harnesses turn off New Tab widgets one at a time today, for example browser.newtabpage.activity-stream.widgets.system.pictureOfTheDay.enabled set to false in testing/profiles. Bug 2078974 makes more widgets available by default on Nightly. Crossword renders an iframe loaded from a Merino host, which crashes any harness that forbids non-local network connections, and that got bug 2078974 backed out twice (browser-chrome, then Marionette).

Set browser.newtabpage.activity-stream.widgets.enabled to false everywhere automation sets prefs, so no widget renders or fetches unless a test turns widgets back on. Every widget render path, and the Picture of the Day feed, already checks this pref through isWidgetEnabled().

The pref is read at runtime, so per the instructions in RecommendedPreferences.sys.mjs it goes in:

  • testing/profiles/common/user.js and testing/profiles/xpcshell/user.js, replacing the per-widget Picture of the Day line
  • testing/marionette/client/marionette_driver/geckoinstance.py
  • remote/shared/RecommendedPreferences.sys.mjs

Tests that need widgets turn them back on with pushPrefEnv.

Sets browser.newtabpage.activity-stream.widgets.enabled to false in the test profiles, the Marionette client and RecommendedPreferences, so no widget renders or fetches in automation unless a test turns widgets back on. This replaces the per-widget Picture of the Day pref in the test profiles.

Pushed by mcrawford@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c67f4ad79934 https://hg.mozilla.org/integration/autoland/rev/64ad03575078 Turn off all New Tab widgets in automation with one pref r=webdriver-reviewers,reemhamz,jdescottes
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch

Sets browser.newtabpage.activity-stream.widgets.enabled to false in the test profiles, the Marionette client and RecommendedPreferences, so no widget renders or fetches in automation unless a test turns widgets back on. This replaces the per-widget Picture of the Day pref in the test profiles.

Original Revision: https://phabricator.services.mozilla.com/D332204

Attachment #9658841 - Flags: approval-mozilla-beta?
Attachment #9658841 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: