Bug 1367089 - Remove automation clue window attribute in mozscreenshots. r=MattN
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 24 May 2017 15:14:37 +0200
changeset 361687 898a81f1f62b302044656d67f8b8c60c67e7b733
parent 361686 fb99ac0fe4e349f50740c923af37ea8b5c3c702b
child 361688 591656964cf4ed767950565bb9b351cbe5a5954d
push id31939
push usercbook@mozilla.com
push dateThu, 01 Jun 2017 11:49:28 +0000
treeherdermozilla-central@d96110d76619 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1367089
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367089 - Remove automation clue window attribute in mozscreenshots. r=MattN MozReview-Commit-ID: 6SvAsI1oKFM
browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
--- 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));
     }