зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1484759 - Update references to browser.xul in tests to use AppConstants.BROWSER_CHROME_URL;r=Gijs
This only includes functions that seem to be using it to reference a window. There are other instances where it's used as a generic chrome URI, and those are left unchanged. Differential Revision: https://phabricator.services.mozilla.com/D3806 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b704584332
Коммит
e858b8d083
|
@ -4,6 +4,7 @@
|
|||
"use strict";
|
||||
|
||||
const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
const { FileUtils } = require("resource://gre/modules/FileUtils.jsm");
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
const Services = require("Services");
|
||||
|
@ -12,7 +13,7 @@ const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
|||
const { DebuggerServer } = require("devtools/server/main");
|
||||
|
||||
var TEST_BASE;
|
||||
if (window.location === "chrome://browser/content/browser.xul") {
|
||||
if (window.location === AppConstants.BROWSER_CHROME_URL) {
|
||||
TEST_BASE = "chrome://mochitests/content/browser/devtools/client/webide/test/";
|
||||
} else {
|
||||
TEST_BASE = "chrome://mochitests/content/chrome/devtools/client/webide/test/";
|
||||
|
|
|
@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=931768
|
|||
/** Test for Bug 931768 **/
|
||||
|
||||
try {
|
||||
openDialog("chrome://browser/content/browser.xul");
|
||||
openDialog(AppConstants.BROWSER_CHROME_URL);
|
||||
ok(false, "Calling openDialog from unprivileged script should throw.");
|
||||
} catch (e) {
|
||||
ok(e instanceof ReferenceError,
|
||||
|
|
|
@ -577,7 +577,7 @@ var BrowserTestUtils = {
|
|||
if (url) {
|
||||
await this.waitForEvent(win, "DOMContentLoaded");
|
||||
|
||||
if (win.document.documentURI != "chrome://browser/content/browser.xul") {
|
||||
if (win.document.documentURI != AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ const windowTracker = {
|
|||
let {document} = window;
|
||||
let {documentURI} = document;
|
||||
|
||||
if (documentURI !== "chrome://browser/content/browser.xul") {
|
||||
if (documentURI !== AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
loadChromeScripts(window);
|
||||
|
|
|
@ -365,7 +365,7 @@ function takeInstrumentation() {
|
|||
}
|
||||
|
||||
win.addEventListener("load", () => {
|
||||
if (win.location.href != "chrome://browser/content/browser.xul") {
|
||||
if (win.location.href != AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// Reads the chrome.manifest from a legacy non-restartless extension and loads
|
||||
// its overlays into the appropriate top-level windows.
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
@ -27,7 +28,7 @@ const windowTracker = {
|
|||
let {document} = window;
|
||||
let {documentURI} = document;
|
||||
|
||||
if (documentURI !== "chrome://browser/content/browser.xul") {
|
||||
if (documentURI !== AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
initializeBrowser(window);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
/* eslint mozilla/avoid-Date-timing: "off" */
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/E10SUtils.jsm");
|
||||
|
||||
var NUM_CYCLES = 5;
|
||||
|
@ -181,7 +182,7 @@ function plInit() {
|
|||
toolbars = "titlebar,resizable";
|
||||
}
|
||||
|
||||
browserWindow = Services.ww.openWindow(null, "chrome://browser/content/", "_blank",
|
||||
browserWindow = Services.ww.openWindow(null, AppConstants.BROWSER_CHROME_URL, "_blank",
|
||||
`chrome,${toolbars},dialog=no,width=${winWidth},height=${winHeight}`, blank);
|
||||
|
||||
gPaintWindow = browserWindow;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// Reads the chrome.manifest from a legacy non-restartless extension and loads
|
||||
// its overlays into the appropriate top-level windows.
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const windowTracker = {
|
||||
|
@ -26,7 +27,7 @@ const windowTracker = {
|
|||
let {document} = window;
|
||||
let {documentURI} = document;
|
||||
|
||||
if (documentURI !== "chrome://browser/content/browser.xul") {
|
||||
if (documentURI !== AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
initializeBrowser(window);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// Reads the chrome.manifest from a legacy non-restartless extension and loads
|
||||
// its overlays into the appropriate top-level windows.
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
@ -27,7 +28,7 @@ const windowTracker = {
|
|||
let {document} = window;
|
||||
let {documentURI} = document;
|
||||
|
||||
if (documentURI !== "chrome://browser/content/browser.xul") {
|
||||
if (documentURI !== AppConstants.BROWSER_CHROME_URL) {
|
||||
return;
|
||||
}
|
||||
initializeBrowser(window);
|
||||
|
|
Загрузка…
Ссылка в новой задаче