зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1501065 - Replace a hardcoded browser.xul reference in pageloader talos tests;r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D11698 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
dd8df1647e
Коммит
a32869aa63
|
@ -37,6 +37,7 @@
|
|||
*
|
||||
* ***** 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");
|
||||
|
@ -56,11 +57,10 @@ async function talosStart() {
|
|||
// 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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче