Bug 1000315 - Part 8: Various tests skip uninstall prompt. r=sicking

This commit is contained in:
Ted Clancy (:tedders1) 2014-06-12 09:53:54 -07:00
parent 6029ad93ef
commit 965c41bed7
25 changed files with 64 additions and 25 deletions

View File

@ -54,10 +54,12 @@
}
function cleanup() {
let req = navigator.mozApps.mgmt.uninstall(app);
req.onsuccess = function () {
SimpleTest.finish();
};
SpecialPowers.autoConfirmAppUninstall(function () {
let req = navigator.mozApps.mgmt.uninstall(app);
req.onsuccess = function () {
SimpleTest.finish();
};
});
}
setupTest();

View File

@ -54,6 +54,9 @@
SpecialPowers.autoConfirmAppInstall(continueTest);
yield undefined;
SpecialPowers.autoConfirmAppUninstall(continueTest);
yield undefined;
var request = navigator.mozApps.install(gHostedManifestURL);
request.onerror = cbError;
request.onsuccess = continueTest;

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -96,7 +96,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -112,6 +112,11 @@
// Run tests in app
testApp,
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppUninstall(runTest);
},
// Uninstall the app
uninstallApp
];

View File

@ -100,7 +100,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app1

View File

@ -92,7 +92,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app1

View File

@ -102,7 +102,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -138,7 +138,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app1

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -89,7 +89,9 @@
function() {
SpecialPowers.setAllAppsLaunchable(true);
// No confirmation needed when an app is installed.
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() => {
SpecialPowers.autoConfirmAppUninstall(runTest);
});
},
function() {

View File

@ -96,7 +96,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -124,7 +124,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the apps

View File

@ -40,6 +40,9 @@
SpecialPowers.autoConfirmAppInstall(continueTest);
yield undefined;
SpecialPowers.autoConfirmAppUninstall(continueTest);
yield undefined;
var request = navigator.mozApps.install(gHostedManifestURL);
request.onerror = cbError;
request.onsuccess = continueTest;

View File

@ -94,7 +94,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -94,7 +94,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -95,7 +95,8 @@
// No confirmation needed when an app is installed
function() {
SpecialPowers.autoConfirmAppInstall(runTest);
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest));
},
// Installing the app

View File

@ -183,7 +183,9 @@ function browserLoadEvent() {
addLoadEvent(() =>
SpecialPowers.pushPrefEnv({set: [['dom.mozBrowserFramesEnabled', true]]}, () =>
SpecialPowers.autoConfirmAppInstall(runTest)
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest)
)
)
);

View File

@ -197,7 +197,9 @@ function checks() {
addLoadEvent(() =>
SpecialPowers.pushPrefEnv({set: [['dom.mozBrowserFramesEnabled', true]]}, () =>
SpecialPowers.autoConfirmAppInstall(runTest)
SpecialPowers.autoConfirmAppInstall(() =>
SpecialPowers.autoConfirmAppUninstall(runTest)
)
)
);

View File

@ -172,7 +172,9 @@ function checkCookie() {
SpecialPowers.pushPrefEnv({set: [['network.cookie.cookieBehavior', 0]]}, () =>
SpecialPowers.autoConfirmAppInstall(() =>
navigator.mozApps.install(gManifestURL, null).onsuccess = onInstall
SpecialPowers.autoConfirmAppUninstall(() =>
navigator.mozApps.install(gManifestURL, null).onsuccess = onInstall
)
)
);
</script>

View File

@ -103,7 +103,9 @@ function onInstall() {
}
SpecialPowers.autoConfirmAppInstall(() =>
navigator.mozApps.install(gManifestURL, null).onsuccess = onInstall
SpecialPowers.autoConfirmAppUninstall(() =>
navigator.mozApps.install(gManifestURL, null).onsuccess = onInstall
)
);
</script>