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:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user