Bug 1367089 - Remove automation clue window attribute in mozscreenshots. r=MattN
MozReview-Commit-ID: 6SvAsI1oKFM
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
@@ -85,16 +85,22 @@ this.TestRunner = {
// Setup some prefs
Services.prefs.setCharPref("browser.aboutHomeSnippets.updateUrl",
"data:text/html;charset=utf-8,Generated by mozscreenshots");
Services.prefs.setCharPref("extensions.ui.lastCategory", "addons://list/extension");
// Don't let the caret blink since it causes false positives for image diffs
Services.prefs.setIntPref("ui.caretBlinkTime", -1);
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
+
+ // When being automated through Marionette, Firefox shows a prominent indication
+ // in the urlbar and identity block. We don't want this to show when testing browser UI.
+ // Note that this doesn't prevent subsequently opened windows from showing the automation UI.
+ browserWindow.document.getElementById("main-window").removeAttribute("remotecontrol");
+
let selectedBrowser = browserWindow.gBrowser.selectedBrowser;
await BrowserTestUtils.loadURI(selectedBrowser, HOME_PAGE);
await BrowserTestUtils.browserLoaded(selectedBrowser);
for (let i = 0; i < this.combos.length; i++) {
this.currentComboIndex = i;
await this._performCombo(this.combos.item(this.currentComboIndex));
}