Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Commit

Permalink
docs(mc): Add a note about how to set test values for prefs (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
k88hudson authored and Mardak committed Aug 1, 2017
1 parent 970b789 commit c7d6c62
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/v2-system-addon/preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ of `value`. For example:
}
```

### IMPORTANT: Setting test-specific values for Mozilla Central

If a feed or feature behind a pref makes any network calls or would other be
disruptive for automated tests and that pref is on by default, make sure you
disable it for tests in Mozilla Central.

You should create a bug in Bugzilla and a patch that adds lines to turn off your
pref in the following files:
- layout/tools/reftest/reftest-preferences.js
- testing/profiles/prefs_general.js
- testing/talos/talos/config.py

You can see an example in [this patch](https://github.com/mozilla/activity-stream/pull/2977).

## Reading, setting, and observing preferences from `.jsm`s

To read/set/observe Activity Stream preferences, construct a `Prefs` instance found in [lib/ActivityStreamPrefs.jsm](../../system-addon/lib/ActivityStreamPrefs.jsm).
Expand Down

0 comments on commit c7d6c62

Please sign in to comment.