Bug 1501065 - Replace a hardcoded browser.xul reference in pageloader talos tests;r=mconley
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 14 Nov 2018 20:57:45 +0000
changeset 446405 ab3dbc49f94d54897502e6ee9973229fc52f3187
parent 446404 3c32668ebbbe810191359d53f00de1a191b966ac
child 446406 2170be698d4b5b7e9da804ce8c98275eade1e8f1
push id35041
push useraiakab@mozilla.com
push dateThu, 15 Nov 2018 09:52:43 +0000
treeherdermozilla-central@48720735b142 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1501065
milestone65.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 1501065 - Replace a hardcoded browser.xul reference in pageloader talos tests;r=mconley Differential Revision: https://phabricator.services.mozilla.com/D11698
testing/talos/talos/pageloader/api.js
--- a/testing/talos/talos/pageloader/api.js
+++ b/testing/talos/talos/pageloader/api.js
@@ -32,16 +32,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "aomStartup",
                                    "@mozilla.org/addons/addon-manager-startup;1",
                                    "amIAddonManagerStartup");
 
@@ -51,21 +52,20 @@ XPCOMUtils.defineLazyServiceGetter(this,
 
 async function talosStart() {
   // Tests are driven from pageloader.xul.  We need to be careful to open
   // pageloader.xul before dismissing the default browser window or we
   // may inadvertently cause the browser to exit before the pageloader.xul
   // window is opened.  Start by finding or waiting for the default window.
   let defaultWin = Services.wm.getMostRecentWindow("navigator:browser");
   if (!defaultWin) {
-    const BROWSER_XUL = "chrome://browser/content/browser.xul";
     defaultWin = await new Promise(resolve => {
       const listener = {
         onOpenWindow(win) {
-          if (win.docShell.domWindow.location.href == BROWSER_XUL) {
+          if (win.docShell.domWindow.location.href == AppConstants.BROWSER_CHROME_URL) {
             Services.wm.removeListener(listener);
             resolve(win);
           }
         },
       };
       Services.wm.addListener(listener);
     });
   }