зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1250453
- Remove DOMApplicationRegistry.allAppsLaunchable property and related testing API. r=myk
This commit is contained in:
Родитель
8c064c8da2
Коммит
1902f1c620
|
@ -45,7 +45,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Screenshot",
|
|||
"resource://gre/modules/Screenshot.jsm");
|
||||
|
||||
Cu.import('resource://gre/modules/Webapps.jsm');
|
||||
DOMApplicationRegistry.allAppsLaunchable = true;
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(Services, 'env',
|
||||
'@mozilla.org/process/environment;1',
|
||||
|
|
|
@ -204,7 +204,6 @@ function installApp() {
|
|||
function setup() {
|
||||
info("Setting up");
|
||||
return new Promise((resolve, reject) => {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.mozBrowserFramesEnabled", true],
|
||||
["dom.serviceWorkers.exemptFromPerDomainMax", true],
|
||||
|
|
|
@ -71,7 +71,6 @@ var steps = [
|
|||
function() {
|
||||
info("== SETUP ==");
|
||||
// Set up
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
SpecialPowers.addPermission("browser", true, document);
|
||||
SpecialPowers.addPermission("embed-apps", true, document);
|
||||
|
|
|
@ -80,10 +80,7 @@ function setup() {
|
|||
Components.utils.import("resource://testing-common/AppInfo.jsm");
|
||||
updateAppInfo();
|
||||
|
||||
// We have to toggle this flag in order to have apps being listed in getAll
|
||||
// as only launchable apps are returned
|
||||
Components.utils.import('resource://gre/modules/Webapps.jsm');
|
||||
DOMApplicationRegistry.allAppsLaunchable = true;
|
||||
|
||||
// Enable launch/close method of the webapps actor
|
||||
let {WebappsActor} = require("devtools/server/actors/webapps");
|
||||
|
|
|
@ -163,8 +163,6 @@ obsService.addObserver(continueTest, "new-activity-registered-failure", false);
|
|||
* Test dev mode activity.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -124,8 +124,6 @@ function continueTest() {
|
|||
}
|
||||
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -196,7 +196,6 @@ this.DOMApplicationRegistry = {
|
|||
// Path to the webapps.json file where we store the registry data.
|
||||
appsFile: null,
|
||||
webapps: { },
|
||||
allAppsLaunchable: false,
|
||||
_updateHandlers: [ ],
|
||||
_pendingUninstalls: {},
|
||||
_contentActions: new Map(),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
var fileTestOnCurrentOrigin = 'http://example.org/tests/dom/apps/tests/file_bug_779982.html';
|
||||
|
||||
|
|
|
@ -193,7 +193,6 @@ var tests = [
|
|||
|
||||
// No confirmation needed when an app is installed
|
||||
function() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(() => {
|
||||
SpecialPowers.autoConfirmAppUninstall(runTest);
|
||||
});
|
||||
|
|
|
@ -8,19 +8,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
function runAll(steps) {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/**
|
||||
* On Mac, apps aren't considered launchable right after they've been
|
||||
* installed because the OS takes some time to detect them (so
|
||||
* nsIMacWebAppUtils::pathForAppWithIdentifier() returns null).
|
||||
* That causes methods like mgmt.getAll() to exclude the app from their
|
||||
* results, even though the app is installed and is in the registry.
|
||||
* See the tests under toolkit/webapps for a viable solution.
|
||||
*
|
||||
* To work around this problem, set allAppsLaunchable to true, which makes
|
||||
* all apps considered as launchable.
|
||||
*/
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
// Clone the array so we don't modify the original.
|
||||
steps = steps.concat();
|
||||
function next() {
|
||||
|
|
|
@ -104,7 +104,6 @@ function installApp(manifestURL, expectedError) {
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.allowUnsignedAddons();
|
||||
SpecialPowers.debugUserCustomizations(true);
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
|
|
|
@ -113,8 +113,6 @@ function installApp(manifestURL) {
|
|||
* Test blocking of an add-on.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Flip the `enabled` state of an app back and forth.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
// Test Bug 927699 - navigator.mozApps.install(url) lets NS_ERROR_FAILURE
|
||||
// onto the web
|
||||
var request = navigator.mozApps.install("");
|
||||
|
|
|
@ -40,7 +40,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1168300
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
var mmListener = {
|
||||
receiveMessage: function(aMessage) {
|
||||
ppmm.removeMessageListener("Webapps:Install", mmListener);
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/PopupNotifications.jsm");
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=795164
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=945152
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [
|
||||
["dom.mozBrowserFramesEnabled", true],
|
||||
|
|
|
@ -53,8 +53,6 @@ function cbError(aError) {
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -149,7 +149,6 @@ function launchApp(app) {
|
|||
|
||||
const tests = [() => {
|
||||
info("Test start");
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(() => {
|
||||
SpecialPowers.autoConfirmAppUninstall(next);
|
||||
});
|
||||
|
|
|
@ -81,8 +81,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Test exporting and importing hosted and packaged apps.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -60,8 +60,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Install 2 apps from the same origin and uninstall them.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Install 2 apps from the same origin and uninstall them.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
var manifestURL1 = gManifestURL + "&app=1";
|
||||
var manifestURL2 = gManifestURL + "&app=2";
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ function cbError(aError) {
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ function installApp(manifestURL) {
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
["dom.mozBrowserFramesEnabled", true],
|
||||
["dom.apps.allow_unsigned_langpacks", true] ]},continueTest);
|
||||
|
|
|
@ -128,7 +128,6 @@ function installApp(installOrigin, manifestURL) {
|
|||
|
||||
PackagedTestHelper.setSteps([
|
||||
function() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
SpecialPowers.addPermission("browser", true, document);
|
||||
SpecialPowers.autoConfirmAppInstall(() =>
|
||||
|
|
|
@ -125,7 +125,6 @@ function testNoPrecompile(aPrecompile, aCallback) {
|
|||
function runTest() {
|
||||
// Set up.
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({'set': [["dom.mozBrowserFramesEnabled", true]]},
|
||||
continueTest);
|
||||
yield undefined;
|
||||
|
|
|
@ -87,7 +87,6 @@ SimpleTest.requestFlakyTimeout("untriaged");
|
|||
var steps = [
|
||||
function() {
|
||||
// Set up
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
info("Set up");
|
||||
PackagedTestHelper.next();
|
||||
|
|
|
@ -142,7 +142,6 @@ function validatePermissions(aList, aDontFail) {
|
|||
var steps = [
|
||||
function() {
|
||||
// Set up
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
info("Set up");
|
||||
// Note that without useCurrentProfile the permissions just aren't added.
|
||||
|
|
|
@ -53,8 +53,6 @@ function cbError(aEvent) {
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ var steps = [
|
|||
var url = SimpleTest.getTestFileURL("chromeAddCert.js");
|
||||
var script = SpecialPowers.loadChromeScript(url);
|
||||
script.addMessageListener("addCertCompleted", function() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
info("Test CA Certificate Selected");
|
||||
PackagedTestHelper.next();
|
||||
|
|
|
@ -56,8 +56,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Checks that no apps that are not certified can be installed as themes.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -146,8 +146,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Test third-party homescreen (permission |homescreen-webapps-manage|)
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=830258
|
|||
|
||||
function runTest() {
|
||||
// Set up.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -103,8 +103,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
* Install a web app from a manifest with application/manifest+json MIME type.
|
||||
*/
|
||||
function runTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
var manifestURL = "http://test/tests/dom/apps/tests/file_manifest.json";
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
|
|
|
@ -10,8 +10,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addPermission();
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
function runTest() {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('mozbrowser', 'true');
|
||||
|
|
|
@ -8,8 +8,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addPermission();
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
function testAppElement(expectAnApp, callback) {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('mozbrowser', 'true');
|
||||
|
|
|
@ -14,8 +14,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addPermission();
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
function runTest() {
|
||||
var canEmbedApp = !browserElementTestHelpers.getOOPByDefaultPref();
|
||||
var iframe = document.createElement('iframe');
|
||||
|
|
|
@ -124,7 +124,6 @@ function runNextTest() {
|
|||
}
|
||||
|
||||
function startTest() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ function runNextTest() {
|
|||
}
|
||||
|
||||
function runTests() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ let gApp;
|
|||
|
||||
function setup() {
|
||||
return new Promise((resolve, reject) => {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
['dom.mozBrowserFramesEnabled', true],
|
||||
['dom.serviceWorkers.exemptFromPerDomainMax', true],
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
ok("getDataStores" in navigator, "getDataStores exists");
|
||||
is(typeof navigator.getDataStores, "function", "getDataStores exists and it's a function");
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest)
|
||||
},
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -132,7 +132,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
},
|
||||
|
||||
function() {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
// No confirmation needed when an app is installed.
|
||||
SpecialPowers.autoConfirmAppInstall(() => {
|
||||
SpecialPowers.autoConfirmAppUninstall(runTest);
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
yield undefined;
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTest);
|
||||
},
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@
|
|||
|
||||
function() {
|
||||
info("enabling use of mozbrowser");
|
||||
//SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
|
||||
runTests();
|
||||
},
|
||||
|
|
|
@ -115,8 +115,6 @@ function start()
|
|||
SpecialPowers.addPermission("embed-apps", true, document);
|
||||
SpecialPowers.addPermission("indexedDB", true, { manifestURL: manifestURL });
|
||||
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
window.addEventListener("unload", function cleanup(event) {
|
||||
if (event.target == document) {
|
||||
window.removeEventListener("unload", cleanup, false);
|
||||
|
|
|
@ -31,8 +31,6 @@ var gScript = SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL('test_per
|
|||
|
||||
// Delay reporting a result until after finish() got called
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Allow tests to disable the per platform app validity checks
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
// Run tests in order
|
||||
function runTests() {
|
||||
|
|
|
@ -140,7 +140,6 @@ function testBroadcastMessage(aMessage, aExpectedManifestURL, aMsg) {
|
|||
*/
|
||||
let steps = [() => {
|
||||
Services.obs.notifyObservers(null, "webapps-registry-ready", null);
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.autoConfirmAppInstall(next);
|
||||
}, () => {
|
||||
SpecialPowers.autoConfirmAppUninstall(next);
|
||||
|
|
|
@ -86,7 +86,6 @@
|
|||
|
||||
function() {
|
||||
SpecialPowers.importInMainProcess("resource://gre/modules/RequestSyncService.jsm");
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.mozBrowserFramesEnabled", true]]}, runTests);
|
||||
},
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
function setupTest() {
|
||||
// We have to install an app in order for the app URL to be valid
|
||||
// (otherwise we get a "DummyChannel" that throws NS_NOT_IMPLEMENTED)
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.addPermission("webapps-manage", true, document);
|
||||
SpecialPowers.autoConfirmAppInstall(function () {
|
||||
let req = navigator.mozApps.install(gManifestURL);
|
||||
|
|
|
@ -24,7 +24,6 @@ let gApp;
|
|||
function setup() {
|
||||
info('Setting up');
|
||||
return new Promise((resolve, reject) => {
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
['dom.mozBrowserFramesEnabled', true]
|
||||
]}, () => {
|
||||
|
|
|
@ -76,9 +76,6 @@ SimpleTest.registerCleanupFunction(() => {
|
|||
Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
});
|
||||
|
||||
// We want to simulate that all apps are launchable, for testing purpose.
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
|
||||
// URL of the manifest of the app we want to install.
|
||||
const gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
|
||||
// ID of the installed app.
|
||||
|
|
|
@ -9,7 +9,6 @@ var NotificationTest = (function () {
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
// turn on testing pref (used by notification.cpp, and mock the alerts
|
||||
SpecialPowers.setBoolPref("notification.prompt.testing", true);
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
}
|
||||
|
||||
function teardown_testing_env() {
|
||||
|
|
|
@ -91,7 +91,6 @@ function runTest() {
|
|||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
// Install the app
|
||||
SpecialPowers.setAllAppsLaunchable(true);
|
||||
var manifestURL = "http://test/tests/dom/apps/tests/file_app.sjs?apptype=hosted&getmanifest=true";
|
||||
|
||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||
|
|
|
@ -1070,7 +1070,6 @@ SimpleTest.finish = function() {
|
|||
}
|
||||
|
||||
if (!parentRunner || parentRunner.showTestReport) {
|
||||
SpecialPowers.flushAllAppsLaunchable();
|
||||
SpecialPowers.flushPermissions(function () {
|
||||
SpecialPowers.flushPrefEnv(function() {
|
||||
SimpleTest.showReport();
|
||||
|
|
|
@ -596,7 +596,6 @@ TestRunner.testFinished = function(tests) {
|
|||
|
||||
SpecialPowers.executeAfterFlushingMessageQueue(function() {
|
||||
cleanUpCrashDumpFiles();
|
||||
SpecialPowers.flushAllAppsLaunchable();
|
||||
SpecialPowers.flushPermissions(function () { SpecialPowers.flushPrefEnv(runNextTest); });
|
||||
});
|
||||
};
|
||||
|
|
|
@ -355,10 +355,6 @@ SpecialPowersObserverAPI.prototype = {
|
|||
let Webapps = {};
|
||||
Components.utils.import("resource://gre/modules/Webapps.jsm", Webapps);
|
||||
switch (aMessage.json.op) {
|
||||
case "set-launchable":
|
||||
let val = Webapps.DOMApplicationRegistry.allAppsLaunchable;
|
||||
Webapps.DOMApplicationRegistry.allAppsLaunchable = aMessage.json.launchable;
|
||||
return val;
|
||||
case "allow-unsigned-addons":
|
||||
{
|
||||
let utils = {};
|
||||
|
|
|
@ -1130,15 +1130,6 @@ SpecialPowersAPI.prototype = {
|
|||
this.pushPrefEnv({set: [['dom.mozApps.auto_confirm_uninstall', true]]}, cb);
|
||||
},
|
||||
|
||||
// Allow tests to disable the per platform app validity checks so we can
|
||||
// test higher level WebApp functionality without full platform support.
|
||||
setAllAppsLaunchable: function(launchable) {
|
||||
this._sendSyncMessage("SPWebAppService", {
|
||||
op: "set-launchable",
|
||||
launchable: launchable
|
||||
});
|
||||
},
|
||||
|
||||
// Allow tests to install addons without signing the package, for convenience.
|
||||
allowUnsignedAddons: function() {
|
||||
this._sendSyncMessage("SPWebAppService", {
|
||||
|
@ -1154,14 +1145,6 @@ SpecialPowersAPI.prototype = {
|
|||
});
|
||||
},
|
||||
|
||||
// Restore the launchable property to its default value.
|
||||
flushAllAppsLaunchable: function() {
|
||||
this._sendSyncMessage("SPWebAppService", {
|
||||
op: "set-launchable",
|
||||
launchable: false
|
||||
});
|
||||
},
|
||||
|
||||
// Force-registering an app in the registry
|
||||
injectApp: function(aAppId, aApp) {
|
||||
this._sendSyncMessage("SPWebAppService", {
|
||||
|
|
Загрузка…
Ссылка в новой задаче