Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2016-02-15 12:30:39 +01:00
commit fe9bc1b944
25 changed files with 238 additions and 28 deletions

10
.gitignore vendored
View File

@ -54,6 +54,16 @@ parser/html/java/javaparser/
.cproject
.settings/
# Ignore the files and directory that JetBrains IDEs create.
/.idea/
*.iml
# Gradle cache.
/.gradle/
# Local Gradle configuration properties.
/local.properties
# Python virtualenv artifacts.
python/psutil/**/*.so
python/psutil/**/*.pyd

View File

@ -4,4 +4,3 @@ support-files =
head.js
[browser_screenshots.js]
tags = screenshots

View File

@ -5,15 +5,12 @@
"use strict";
add_task(function* capture() {
if (!shouldCapture()) {
let setsEnv = env.get("MOZSCREENSHOTS_SETS");
if (!setsEnv) {
ok(true, "MOZSCREENSHOTS_SETS wasn't specified so there's nothing to capture");
return;
}
let { TestRunner } = Cu.import("chrome://mozscreenshots/content/TestRunner.jsm", {});
let sets = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "LightweightThemes"];
let setsEnv = env.get("MOZSCREENSHOTS_SETS");
if (setsEnv) {
sets = setsEnv.trim().split(",");
}
let sets = setsEnv.trim().split(",");
yield TestRunner.start(sets);
});

View File

@ -0,0 +1,6 @@
[DEFAULT]
subsuite = screenshots
support-files =
../head.js
[browser_devtools.js]

View File

@ -0,0 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
add_task(function* capture() {
if (!shouldCapture()) {
return;
}
let sets = ["DevTools"];
yield TestRunner.start(sets);
});

View File

@ -6,6 +6,7 @@
const {AddonWatcher} = Cu.import("resource://gre/modules/AddonWatcher.jsm", {});
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
let TestRunner;
function setup() {
requestLongerTimeout(20);
@ -15,18 +16,25 @@ function setup() {
AddonManager.getAddonByID("mozscreenshots@mozilla.org", function(aAddon) {
isnot(aAddon, null, "The mozscreenshots extension should be installed");
AddonWatcher.ignoreAddonPermanently(aAddon.id);
TestRunner = Cu.import("chrome://mozscreenshots/content/TestRunner.jsm", {}).TestRunner;
resolve();
});
});
}
function shouldCapture() {
// Try pushes only capture in browser_screenshots.js with MOZSCREENSHOTS_SETS.
if (env.get("MOZSCREENSHOTS_SETS")) {
ok(true, "MOZSCREENSHOTS_SETS was specified so only capture what was " +
"requested (in browser_screenshots.js)");
return false;
}
// Automation isn't able to schedule test jobs to only run on nightlies so we handle it here
// (see also: bug 1116275). Try pushes and local builds should also capture.
// (see also: bug 1116275).
let capture = AppConstants.MOZ_UPDATE_CHANNEL == "nightly" ||
(AppConstants.SOURCE_REVISION_URL.includes("/try/rev/") &&
env.get("MOZSCREENSHOTS_SETS")) ||
AppConstants.SOURCE_REVISION_URL == "";
AppConstants.SOURCE_REVISION_URL == "" ||
AppConstants.SOURCE_REVISION_URL == "1"; // bug 1248027
if (!capture) {
ok(true, "Capturing is disabled for this MOZ_UPDATE_CHANNEL or REPO");
}

View File

@ -4,7 +4,14 @@
# 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/.
BROWSER_CHROME_MANIFESTS += ['browser.ini']
BROWSER_CHROME_MANIFESTS += [
# Each test is in it's own directory so it gets run in a clean profile with
# run-by-dir.
'browser.ini',
'devtools/browser.ini',
'preferences/browser.ini',
'primaryUI/browser.ini',
]
TEST_DIRS += [
'mozscreenshots/extension',

View File

@ -11,7 +11,6 @@ const defaultSetNames = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "Li
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
const HOME_PAGE = "chrome://mozscreenshots/content/lib/mozscreenshots.html";
Cu.import("resource://testing-common/BrowserTestUtils.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
@ -19,6 +18,9 @@ Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserTestUtils",
"resource://testing-common/BrowserTestUtils.jsm");
Cu.import("chrome://mozscreenshots/content/Screenshot.jsm");
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
@ -42,6 +44,7 @@ this.TestRunner = {
_libDir: null,
init(extensionPath) {
log.info("init");
this._extensionPath = extensionPath;
},

View File

@ -9,7 +9,9 @@ this.EXPORTED_SYMBOLS = ["Preferences"];
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://testing-common/TestUtils.jsm");
this.Preferences = {
@ -31,7 +33,7 @@ this.Preferences = {
["paneAdvanced", "encryptionTab"],
];
for (let [primary, advanced] of panes) {
let configName = primary + ("-" + advanced || "");
let configName = primary.replace(/^pane/, "prefs") + (advanced ? "-" + advanced : "");
this.configurations[configName] = {};
this.configurations[configName].applyConfig = prefHelper.bind(null, primary, advanced);
}
@ -40,14 +42,27 @@ this.Preferences = {
configurations: {},
};
function prefHelper(primary, advanced) {
return new Promise((resolve) => {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
if (primary == "paneAdvanced") {
browserWindow.openAdvancedPreferences(advanced);
} else {
browserWindow.openPreferences(primary);
}
setTimeout(resolve, 50);
});
}
let prefHelper = Task.async(function*(primary, advanced) {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
let selectedBrowser = browserWindow.gBrowser;
let readyPromise = null;
if (selectedBrowser.currentURI.specIgnoringRef == "about:preferences") {
readyPromise = new Promise((resolve) => {
browserWindow.addEventListener("MozAfterPaint", function paneSwitch() {
browserWindow.removeEventListener("MozAfterPaint", paneSwitch);
resolve();
});
});
} else {
readyPromise = TestUtils.topicObserved("advanced-pane-loaded");
}
if (primary == "paneAdvanced") {
browserWindow.openAdvancedPreferences(advanced);
} else {
browserWindow.openPreferences(primary);
}
yield readyPromise;
});

View File

@ -0,0 +1,6 @@
[DEFAULT]
subsuite = screenshots
support-files =
../head.js
[browser_preferences.js]

View File

@ -0,0 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
add_task(function* capture() {
if (!shouldCapture()) {
return;
}
let sets = ["Preferences"];
yield TestRunner.start(sets);
});

View File

@ -0,0 +1,6 @@
[DEFAULT]
subsuite = screenshots
support-files =
../head.js
[browser_primaryUI.js]

View File

@ -0,0 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
add_task(function* capture() {
if (!shouldCapture()) {
return;
}
let sets = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "LightweightThemes"];
yield TestRunner.start(sets);
});

View File

@ -818,6 +818,8 @@ public class BrowserSearch extends HomeFragment
// Pref observer in gecko will also set prompted = true
PrefsHelper.setPref("browser.search.suggest.enabled", enabled);
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, (enabled ? "suggestions_optin_yes" : "suggestions_optin_no"));
TranslateAnimation slideAnimation = new TranslateAnimation(0, mSuggestionsOptInPrompt.getWidth(), 0, 0);
slideAnimation.setDuration(ANIMATION_DURATION);
slideAnimation.setInterpolator(new AccelerateInterpolator());

View File

@ -540,6 +540,7 @@ EnvironmentAddonBuilder.prototype = {
installDay: Utils.millisecondsToDays(installDate.getTime()),
updateDay: Utils.millisecondsToDays(updateDate.getTime()),
signedState: addon.signedState,
isSystem: addon.isSystem,
};
if (addon.signedState !== undefined)

View File

@ -195,6 +195,7 @@ Structure::
installDay: <number>, // days since UNIX epoch, 0 on failure
updateDay: <number>, // days since UNIX epoch, 0 on failure
signedState: <integer>, // whether the add-on is signed by AMO, only present for extensions
isSystem: <bool>, // true if this is a System Add-on
},
...
},

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>tel-system-xpi@tests.mozilla.org</em:id>
<em:version>1.0</em:version>
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>XPI Telemetry System Add-on Test</em:name>
<em:description>A system addon which is shipped with Firefox.</em:description>
<em:bootstrap>true</em:bootstrap>
</Description>
</RDF>

View File

@ -166,6 +166,10 @@ function loadAddonManager(id, name, version, platformVersion) {
let uri = ns.Services.io.newFileURI(file);
ns.Services.scriptloader.loadSubScript(uri.spec, gGlobalScope);
createAppInfo(id, name, version, platformVersion);
// As we're not running in application, we need to setup the features directory
// used by system add-ons.
const distroDir = FileUtils.getDir("ProfD", ["sysfeatures", "app0"], true);
registerDirectory("XREAppFeat", distroDir);
startupManager();
}

View File

@ -9,6 +9,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
Cu.import("resource://testing-common/AddonManagerTesting.jsm");
Cu.import("resource://testing-common/httpd.js");
Cu.import("resource://testing-common/MockRegistrar.jsm", this);
Cu.import("resource://gre/modules/FileUtils.jsm");
// Lazy load |LightweightThemeManager|, we won't be using it on Gonk.
XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
@ -67,6 +68,9 @@ const PERSONA_DESCRIPTION = "A nice theme/persona description.";
const PLUGIN_UPDATED_TOPIC = "plugins-list-updated";
// system add-ons are enabled at startup, so record date when the test starts
const SYSTEM_ADDON_INSTALL_DATE = Date.now();
/**
* Used to mock plugin tags in our fake plugin host.
*/
@ -571,6 +575,11 @@ function checkSystemSection(data) {
}
function checkActiveAddon(data){
let signedState = mozinfo.addon_signing ? "number" : "undefined";
// system add-ons have an undefined signState
if (data.isSystem)
signedState = "undefined";
const EXPECTED_ADDON_FIELDS_TYPES = {
blocklisted: "boolean",
name: "string",
@ -583,7 +592,8 @@ function checkActiveAddon(data){
hasBinaryComponents: "boolean",
installDay: "number",
updateDay: "number",
signedState: mozinfo.addon_signing ? "number" : "undefined",
signedState: signedState,
isSystem: "boolean",
};
for (let f in EXPECTED_ADDON_FIELDS_TYPES) {
@ -715,6 +725,13 @@ function run_test() {
do_test_pending();
spoofGfxAdapter();
do_get_profile();
// The system add-on must be installed before AddonManager is started.
const distroDir = FileUtils.getDir("ProfD", ["sysfeatures", "app0"], true);
do_get_file("system.xpi").copyTo(distroDir, "tel-system-xpi@tests.mozilla.org.xpi");
let system_addon = FileUtils.File(distroDir.path);
system_addon.append("tel-system-xpi@tests.mozilla.org.xpi");
system_addon.lastModifiedTime = SYSTEM_ADDON_INSTALL_DATE;
loadAddonManager(APP_ID, APP_NAME, APP_VERSION, PLATFORM_VERSION);
// Spoof the persona ID, but not on Gonk.
@ -1016,6 +1033,24 @@ add_task(function* test_addonsAndPlugins() {
installDay: ADDON_INSTALL_DATE,
updateDay: ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
isSystem: false,
};
const SYSTEM_ADDON_ID = "tel-system-xpi@tests.mozilla.org";
const EXPECTED_SYSTEM_ADDON_DATA = {
blocklisted: false,
description: "A system addon which is shipped with Firefox.",
name: "XPI Telemetry System Add-on Test",
userDisabled: false,
appDisabled: false,
version: "1.0",
scope: 1,
type: "extension",
foreignInstall: false,
hasBinaryComponents: false,
installDay: truncateToDays(SYSTEM_ADDON_INSTALL_DATE),
updateDay: truncateToDays(SYSTEM_ADDON_INSTALL_DATE),
signedState: undefined,
isSystem: true,
};
const EXPECTED_PLUGIN_DATA = {
@ -1040,6 +1075,13 @@ add_task(function* test_addonsAndPlugins() {
Assert.equal(targetAddon[f], EXPECTED_ADDON_DATA[f], f + " must have the correct value.");
}
// Check system add-on data.
Assert.ok(SYSTEM_ADDON_ID in data.addons.activeAddons, "We must have one active system addon.");
let targetSystemAddon = data.addons.activeAddons[SYSTEM_ADDON_ID];
for (let f in EXPECTED_SYSTEM_ADDON_DATA) {
Assert.equal(targetSystemAddon[f], EXPECTED_SYSTEM_ADDON_DATA[f], f + " must have the correct value.");
}
// Check theme data.
let theme = data.addons.theme;
Assert.equal(theme.id, (PERSONA_ID + PERSONA_ID_SUFFIX));

View File

@ -12,6 +12,7 @@ support-files =
experiment.xpi
extension.xpi
extension-2.xpi
system.xpi
restartless.xpi
theme.xpi
generated-files =
@ -19,6 +20,7 @@ generated-files =
experiment.xpi
extension.xpi
extension-2.xpi
system.xpi
restartless.xpi
theme.xpi

View File

@ -1,4 +1,4 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
@ -7137,6 +7137,12 @@ AddonWrapper.prototype = {
addon._installLocation.name == KEY_APP_SYSTEM_ADDONS);
},
get isSystem() {
let addon = addonFor(this);
return (addon._installLocation.name == KEY_APP_SYSTEM_DEFAULTS ||
addon._installLocation.name == KEY_APP_SYSTEM_ADDONS);
},
isCompatibleWith: function(aAppVersion, aPlatformVersion) {
return addonFor(this).isCompatibleWith(aAppVersion, aPlatformVersion);
},

View File

@ -185,6 +185,7 @@ function check_test_1(installSyncGUID) {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_INSTALL);
@ -291,6 +292,7 @@ function run_test_4() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_ENABLE);
@ -333,6 +335,7 @@ function run_test_5() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_false(isExtensionInAddonsList(profileDir, b1.id));
do_check_bootstrappedPref(run_test_6);
@ -376,6 +379,7 @@ function check_test_6() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "2.0");
BootstrapMonitor.checkAddonStarted(ID1, "2.0");
do_check_eq(getStartupReason(), ADDON_UPGRADE);
@ -446,6 +450,7 @@ function run_test_8() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_INSTALL);
@ -516,6 +521,7 @@ function check_test_10_pt1() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "2.0");
BootstrapMonitor.checkAddonStarted(ID1, "2.0");
do_check_eq(getStartupReason(), ADDON_INSTALL);
@ -560,6 +566,7 @@ function check_test_10_pt2() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_DOWNGRADE);
@ -626,6 +633,7 @@ function run_test_12() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_INSTALL);
@ -754,6 +762,7 @@ function run_test_15() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
@ -826,6 +835,7 @@ function run_test_16() {
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(b1.iconURL, "chrome://foo/skin/icon.png");
do_check_eq(b1.aboutURL, "chrome://foo/content/about.xul");
do_check_eq(b1.optionsURL, "chrome://foo/content/options.xul");
@ -883,6 +893,7 @@ function run_test_17() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_bootstrappedPref(run_test_18);
});
@ -899,6 +910,7 @@ function run_test_18() {
do_check_neq(b1, null);
do_check_eq(b1.version, "2.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(getShutdownReason(), ADDON_UPGRADE);
do_check_eq(getUninstallReason(), ADDON_UPGRADE);
@ -941,6 +953,7 @@ function check_test_19() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
// TODO these reasons really should be ADDON_DOWNGRADE (bug 607818)
do_check_eq(getShutdownReason(), ADDON_UNINSTALL);
@ -974,6 +987,7 @@ function run_test_20() {
do_check_neq(b1, null);
do_check_eq(b1.version, "2.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(getShutdownReason(), APP_SHUTDOWN);
do_check_eq(getUninstallReason(), ADDON_UPGRADE);
@ -1008,6 +1022,7 @@ function run_test_21() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
// This won't be set as the bootstrap script was gone so we couldn't
// uninstall it properly
@ -1051,6 +1066,7 @@ function run_test_22() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
shutdownManager();
@ -1071,6 +1087,7 @@ function run_test_22() {
do_check_neq(b1, null);
do_check_eq(b1.version, "2.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
// This won't be set as the bootstrap script was gone so we couldn't
// uninstall it properly
@ -1150,6 +1167,7 @@ function check_test_23() {
do_check_false(b1.appDisabled);
do_check_false(b1.userDisabled);
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");
do_check_eq(getStartupReason(), ADDON_INSTALL);
@ -1238,6 +1256,7 @@ function run_test_25() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE));
restartManager();
@ -1251,6 +1270,7 @@ function run_test_25() {
do_check_neq(b1, null);
do_check_eq(b1.version, "4.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE);
do_check_bootstrappedPref(run_test_26);
@ -1275,6 +1295,7 @@ function run_test_26() {
do_check_neq(b1, null);
do_check_eq(b1.version, "4.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE));
restartManager();
@ -1288,6 +1309,7 @@ function run_test_26() {
do_check_neq(b1, null);
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE);
do_check_bootstrappedPref(run_test_27);
@ -1368,6 +1390,7 @@ function run_test_28() {
b1.userDisabled = false;
do_check_eq(b1.version, "1.0");
do_check_true(b1.isActive);
do_check_false(b1.isSystem);
do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE);
BootstrapMonitor.checkAddonInstalled(ID1, "1.0");
BootstrapMonitor.checkAddonStarted(ID1, "1.0");

View File

@ -46,6 +46,7 @@ function* check_installed(inProfile, ...versions) {
do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_UPGRADE));
do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_UNINSTALL));
do_check_true(addon.hidden);
do_check_true(addon.isSystem);
// Verify the add-ons file is in the right place
let file = expectedDir.clone();

View File

@ -162,6 +162,7 @@ function* check_installed(inProfile, ...versions) {
do_check_true(addon.isActive);
do_check_false(addon.foreignInstall);
do_check_true(addon.hidden);
do_check_true(addon.isSystem);
// Verify the add-ons file is in the right place
let file = expectedDir.clone();

View File

@ -54,6 +54,7 @@ add_task(function*() {
do_check_true(addon.isCompatible);
do_check_false(addon.appDisabled);
do_check_true(addon.isActive);
do_check_false(addon.isSystem);
do_check_eq(addon.type, "extension");
do_check_eq(addon.signedState, mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED);
@ -81,6 +82,7 @@ add_task(function*() {
do_check_true(addon.isCompatible);
do_check_false(addon.appDisabled);
do_check_true(addon.isActive);
do_check_false(addon.isSystem);
do_check_eq(addon.type, "extension");
do_check_eq(addon.signedState, mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED);
@ -134,6 +136,7 @@ add_task(function*() {
do_check_true(addon.isCompatible);
do_check_false(addon.appDisabled);
do_check_true(addon.isActive);
do_check_false(addon.isSystem);
do_check_eq(addon.type, "extension");
do_check_eq(addon.signedState, mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED);
@ -252,6 +255,7 @@ add_task(function*() {
do_check_neq(first_addon, null);
do_check_false(first_addon.appDisabled);
do_check_true(first_addon.isActive);
do_check_false(first_addon.isSystem);
let manifestjson_id= "last-webextension2@tests.mozilla.org";
let last_addon = yield promiseAddonByID(manifestjson_id);