зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 73b7fefcfc45 (bug 1830816) for causing mochitest failures on browser_controlCenter.js. CLOSED TREE
This commit is contained in:
Родитель
56d18f7b03
Коммит
e54270ef63
|
@ -699,7 +699,7 @@ module.exports = {
|
|||
"browser/base/content/test/sanitize/browser_sanitize-history.js",
|
||||
"devtools/client/shared/test/shared-head.js",
|
||||
"devtools/client/shared/test/head.js",
|
||||
"browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.sys.mjs",
|
||||
"browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm",
|
||||
// uses new HttpServer which doesn't support https
|
||||
"browser/base/content/test/favicons/browser_favicon_nostore.js",
|
||||
// That are all files that produes warnings in the existing test infrastructure.
|
||||
|
|
|
@ -33,9 +33,8 @@ async function setup() {
|
|||
|
||||
let aAddon = await AddonManager.getAddonByID("mozscreenshots@mozilla.org");
|
||||
isnot(aAddon, null, "The mozscreenshots extension should be installed");
|
||||
TestRunner = ChromeUtils.importESModule(
|
||||
"resource://mozscreenshots/TestRunner.sys.mjs"
|
||||
).TestRunner;
|
||||
TestRunner = ChromeUtils.import("resource://mozscreenshots/TestRunner.jsm")
|
||||
.TestRunner;
|
||||
TestRunner.initTest(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["Screenshot"];
|
||||
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
|
||||
// See LOG_LEVELS in Console.sys.mjs. Common examples: "All", "Info", "Warn", &
|
||||
|
@ -22,7 +30,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
return new ConsoleAPI(consoleOptions);
|
||||
});
|
||||
|
||||
export var Screenshot = {
|
||||
var Screenshot = {
|
||||
_extensionPath: null,
|
||||
_path: null,
|
||||
_imagePrefix: "",
|
|
@ -2,22 +2,36 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["TestRunner"];
|
||||
|
||||
const APPLY_CONFIG_TIMEOUT_MS = 60 * 1000;
|
||||
const HOME_PAGE = "resource://mozscreenshots/lib/mozscreenshots.html";
|
||||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { Rect } from "resource://gre/modules/Geometry.sys.mjs";
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { Rect } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Geometry.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserTestUtils: "resource://testing-common/BrowserTestUtils.sys.mjs",
|
||||
// Screenshot.sys.mjs must be imported this way for xpcshell tests to work
|
||||
Screenshot: "resource://mozscreenshots/Screenshot.jsm",
|
||||
});
|
||||
// Screenshot.jsm must be imported this way for xpcshell tests to work
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"Screenshot",
|
||||
"resource://mozscreenshots/Screenshot.jsm"
|
||||
);
|
||||
|
||||
export var TestRunner = {
|
||||
var TestRunner = {
|
||||
combos: null,
|
||||
completedCombos: 0,
|
||||
currentComboIndex: 0,
|
|
@ -18,8 +18,8 @@ this.mozscreenshots = class extends ExtensionAPI {
|
|||
let uri = Services.io.newURI("resources/", null, this.extension.rootURI);
|
||||
resProto.setSubstitution("mozscreenshots", uri);
|
||||
|
||||
const { TestRunner } = ChromeUtils.importESModule(
|
||||
"resource://mozscreenshots/TestRunner.sys.mjs"
|
||||
const { TestRunner } = ChromeUtils.import(
|
||||
"resource://mozscreenshots/TestRunner.jsm"
|
||||
);
|
||||
TestRunner.init(this.extension.rootURI);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
export var AppMenu = {
|
||||
var EXPORTED_SYMBOLS = ["AppMenu"];
|
||||
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var AppMenu = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,11 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["Buttons"];
|
||||
|
||||
const { CustomizableUI } = ChromeUtils.import(
|
||||
"resource:///modules/CustomizableUI.jsm"
|
||||
);
|
||||
|
||||
export var Buttons = {
|
||||
var Buttons = {
|
||||
init(libDir) {
|
||||
createWidget();
|
||||
},
|
|
@ -2,14 +2,23 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["ControlCenter"];
|
||||
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const { SitePermissions } = ChromeUtils.import(
|
||||
"resource:///modules/SitePermissions.jsm"
|
||||
);
|
||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
let { UrlClassifierTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
||||
|
@ -29,7 +38,7 @@ const MIXED_ACTIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_act
|
|||
const MIXED_PASSIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_passive.html`;
|
||||
const TRACKING_PAGE = `http://tracking.example.org/${RESOURCE_PATH}/tracking.html`;
|
||||
|
||||
export var ControlCenter = {
|
||||
var ControlCenter = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,9 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
export var CustomizeMode = {
|
||||
var EXPORTED_SYMBOLS = ["CustomizeMode"];
|
||||
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
var CustomizeMode = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,11 +2,17 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { require } from "resource://devtools/shared/loader/Loader.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["DevTools"];
|
||||
|
||||
const { require } = ChromeUtils.importESModule(
|
||||
"resource://devtools/shared/loader/Loader.sys.mjs"
|
||||
);
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
async function showToolboxForSelectedTab(toolId, hostType) {
|
||||
const browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
|
@ -18,7 +24,7 @@ function selectToolbox(toolbox) {
|
|||
return toolbox.win.document.querySelector("#toolbox-container");
|
||||
}
|
||||
|
||||
export var DevTools = {
|
||||
var DevTools = {
|
||||
init(libDir) {
|
||||
let panels = [
|
||||
"options",
|
|
@ -2,11 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["LightweightThemes"];
|
||||
|
||||
const { AddonManager } = ChromeUtils.import(
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
|
||||
export var LightweightThemes = {
|
||||
var LightweightThemes = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,16 +2,22 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Various parts here are run in the content process.
|
||||
/* global content */
|
||||
|
||||
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
||||
var EXPORTED_SYMBOLS = ["PermissionPrompts"];
|
||||
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const URL =
|
||||
"https://test1.example.com/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/resources/lib/permissionPrompts.html";
|
||||
let lastTab = null;
|
||||
|
||||
export var PermissionPrompts = {
|
||||
var PermissionPrompts = {
|
||||
init(libDir) {
|
||||
Services.prefs.setBoolPref("media.navigator.permission.fake", true);
|
||||
Services.prefs.setBoolPref("extensions.install.requireBuiltInCerts", false);
|
|
@ -2,12 +2,17 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Various parts here are run in the content process.
|
||||
/* global content */
|
||||
|
||||
import { TestUtils } from "resource://testing-common/TestUtils.sys.mjs";
|
||||
var EXPORTED_SYMBOLS = ["Preferences"];
|
||||
|
||||
export var Preferences = {
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
var Preferences = {
|
||||
init(libDir) {
|
||||
let panes = [
|
||||
["paneGeneral"],
|
|
@ -2,14 +2,22 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["Tabs"];
|
||||
|
||||
const CUST_TAB = "chrome://browser/skin/customize.svg";
|
||||
const PREFS_TAB = "chrome://global/skin/icons/settings.svg";
|
||||
const DEFAULT_FAVICON_TAB = `data:text/html,<meta%20charset="utf-8"><title>No%20favicon</title>`;
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { TestUtils } from "resource://testing-common/TestUtils.sys.mjs";
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
export var Tabs = {
|
||||
var Tabs = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,9 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["TabsInTitlebar"];
|
||||
|
||||
const PREF_TABS_IN_TITLEBAR = "browser.tabs.inTitlebar";
|
||||
|
||||
export var TabsInTitlebar = {
|
||||
var TabsInTitlebar = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,7 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
export var Toolbars = {
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["Toolbars"];
|
||||
|
||||
var Toolbars = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,7 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
export var UIDensities = {
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["UIDensities"];
|
||||
|
||||
var UIDensities = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
|
@ -2,10 +2,18 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
||||
"use strict";
|
||||
|
||||
export var WindowSize = {
|
||||
var EXPORTED_SYMBOLS = ["WindowSize"];
|
||||
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var WindowSize = {
|
||||
init(libDir) {
|
||||
Services.prefs.setBoolPref("browser.fullscreen.autohide", false);
|
||||
},
|
|
@ -15,24 +15,24 @@ FINAL_TARGET_FILES += [
|
|||
]
|
||||
|
||||
FINAL_TARGET_FILES.resources += [
|
||||
"Screenshot.sys.mjs",
|
||||
"TestRunner.sys.mjs",
|
||||
"Screenshot.jsm",
|
||||
"TestRunner.jsm",
|
||||
]
|
||||
|
||||
FINAL_TARGET_FILES.resources.configurations += [
|
||||
"configurations/AppMenu.sys.mjs",
|
||||
"configurations/Buttons.sys.mjs",
|
||||
"configurations/ControlCenter.sys.mjs",
|
||||
"configurations/CustomizeMode.sys.mjs",
|
||||
"configurations/DevTools.sys.mjs",
|
||||
"configurations/LightweightThemes.sys.mjs",
|
||||
"configurations/PermissionPrompts.sys.mjs",
|
||||
"configurations/Preferences.sys.mjs",
|
||||
"configurations/Tabs.sys.mjs",
|
||||
"configurations/TabsInTitlebar.sys.mjs",
|
||||
"configurations/Toolbars.sys.mjs",
|
||||
"configurations/UIDensities.sys.mjs",
|
||||
"configurations/WindowSize.sys.mjs",
|
||||
"configurations/AppMenu.jsm",
|
||||
"configurations/Buttons.jsm",
|
||||
"configurations/ControlCenter.jsm",
|
||||
"configurations/CustomizeMode.jsm",
|
||||
"configurations/DevTools.jsm",
|
||||
"configurations/LightweightThemes.jsm",
|
||||
"configurations/PermissionPrompts.jsm",
|
||||
"configurations/Preferences.jsm",
|
||||
"configurations/Tabs.jsm",
|
||||
"configurations/TabsInTitlebar.jsm",
|
||||
"configurations/Toolbars.jsm",
|
||||
"configurations/UIDensities.jsm",
|
||||
"configurations/WindowSize.jsm",
|
||||
]
|
||||
|
||||
FINAL_TARGET_FILES.resources.lib += [
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { TestRunner } = ChromeUtils.importESModule(
|
||||
"resource://test/TestRunner.sys.mjs"
|
||||
);
|
||||
const { TestRunner } = ChromeUtils.import("resource://test/TestRunner.jsm");
|
||||
|
||||
add_task(async function capture() {
|
||||
equal(TestRunner.findComma("Toolbars,Devs"), 8);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[DEFAULT]
|
||||
skip-if = toolkit == 'android' # bug 1730213
|
||||
support-files = ../../mozscreenshots/extension/TestRunner.sys.mjs
|
||||
support-files = ../../mozscreenshots/extension/TestRunner.jsm
|
||||
|
||||
[test_testConfigurations.js]
|
||||
|
|
|
@ -68,7 +68,7 @@ avoid-blacklist-and-whitelist:
|
|||
- browser/extensions/screenshots/background/main.js
|
||||
- browser/extensions/webcompat/shims/nielsen.js
|
||||
- browser/modules/SitePermissions.jsm
|
||||
- browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs
|
||||
- browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm
|
||||
- build/clang-plugin/CustomMatchers.h
|
||||
- build/clang-plugin/FopenUsageChecker.cpp
|
||||
- build/clang-plugin/NaNExprChecker.cpp
|
||||
|
|
Загрузка…
Ссылка в новой задаче