Bug 1726465 - Don't update remote control cue for startup performance tests. r=florian

Startup performance tests are browser-chrome tests which use Marionette
to install required extensions. Because Marionette will be initialized
earlier during the startup of Firefox this can cause a partially updated
remote control cue for the first opened browser window.

As such stop updating the remote control cue by guarding this behavior
behind two flags - when the browser is in automation and a special
preference set.

Differential Revision: https://phabricator.services.mozilla.com/D145934
This commit is contained in:
Henrik Skupin
2022-05-10 09:04:03 +00:00
parent 39aed41129
commit e0b4a7ad89
2 changed files with 13 additions and 0 deletions

View File

@@ -8403,6 +8403,16 @@ const gRemoteControl = {
},
updateVisualCue() {
// Disable updating the remote control cue for performance tests,
// because these could fail due to an early initialization of Marionette.
const disableRemoteControlCue = Services.prefs.getBoolPref(
"browser.chrome.disableRemoteControlCueForTests",
false
);
if (disableRemoteControlCue && Cu.isInAutomation) {
return;
}
const mainWindow = document.documentElement;
const remoteControlComponent = this.getRemoteControlComponent();
if (remoteControlComponent) {

View File

@@ -15,6 +15,9 @@ prefs =
extensions.formautofill.addresses.available='on'
extensions.formautofill.creditCards.available='on'
browser.urlbar.disableExtendForTests=true
# For perfomance tests do not enable the remote control cue, which gets set
# when Marionette is enabled, but users normally don't see.
browser.chrome.disableRemoteControlCueForTests=true
# The Screenshots extension is disabled by default in Mochitests. We re-enable
# it here, since it's a more realistic configuration.
extensions.screenshots.disabled=false