I reviewed existing call sites for isInAutomation and didn't find anything suspicious so far, so hopefully we can get away with a fix focused on https://searchfox.org/mozilla-central/rev/bb14d901ac16633801b7f4adaa4fb104e6f072e4/services/settings/Utils.jsm#60-72 The remaining question is how should we detect that we are running marionette-based tests. Few options: - we could use `MOZ_MARIONETTE`, but this is always set when Marionette is enabled, so it might be incorrect - we can create another env variable, we just need to figure out from where it would make sense. Would geckoinstance be ok? Or should we set it from the same spots where we set MOZ_DISABLE_NONLOCAL_CONNECTIONS. - alternatively Utils.jsm could check `MOZ_DISABLE_NONLOCAL_CONNECTIONS`? It's more generic than checking against marionette and makes sense from a code standpoint: if we are in an environment which disables connections, we should not force the settings server
Bug 1272255 Comment 18 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I reviewed existing call sites for isInAutomation and didn't find anything suspicious so far, so hopefully we can get away with a fix focused on https://searchfox.org/mozilla-central/rev/bb14d901ac16633801b7f4adaa4fb104e6f072e4/services/settings/Utils.jsm#60-72 The remaining question is how should we detect that we are running marionette-based tests. Few options: - we could use `MOZ_MARIONETTE`, but this is always set when Marionette is enabled, so it might be incorrect - we can create another env variable, we just need to figure out from where it would make sense. Would geckoinstance be ok? Or should we set it from the same spots where we set `MOZ_DISABLE_NONLOCAL_CONNECTIONS`. - alternatively Utils.jsm could check `MOZ_DISABLE_NONLOCAL_CONNECTIONS`? It's more generic than checking against marionette and makes sense from a code standpoint: if we are in an environment which disables connections, we should not force the settings server