Hey Mike, according to our code coverage report, nsAutoConfig is never executed during tests.
As far as I can see, it is actually not tested, as the test you mentioned is not setting the autoadmin.global_config_url pref that would make nsReadConfig instantiate nsAutoConfig. Is that correct? I'd like to understand whether this is a problem in our coverage collection tools that are not picking up this file for some reason or if it actually is not tested. I've opened https://bugzilla.mozilla.org/show_bug.cgi?id=1413600. - Marco. On Tuesday, October 31, 2017 at 4:22:06 PM UTC+1, mka...@mozilla.com wrote: > On Tuesday, October 31, 2017 at 12:10:21 AM UTC-5, Nicholas Nethercote wrote: > > Hi, > > > > I was just looking at the extensions/pref/autoconfig/ directory and trying > > to understand what it does. > > > > As far as I can tell, the code is there to allow custom deployments with > > particular prefs set, as described at > > https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment#Configuration > > > > It's initialized by modules/libpref/Preferences.cpp if a > > "general.config.filename" pref is found: > > http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 > > > > There is also some MozHarness code relating to it here: > > http://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/firefox/autoconfig.py > > > > Just to check: is this still supported functionality? > > > > Thanks. > > > > Nick > > Yes, this is very much supported functionality. It is our primary means of > enterprise customization right now. > > The reason there are very few tests is because when it was first developed, > it wasn't possible to write tests that involved putting down files before > startup. There are some tests now: > > http://searchfox.org/mozilla-central/source/extensions/pref/autoconfig/test/unit > > Mike Kaply _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform