Commit afe1a1e9 authored by Dorel Luca's avatar Dorel Luca
Browse files

Backed out changeset 29b08c635a7c (bug 1518663) for Browser-Chrome failures in...

Backed out changeset 29b08c635a7c (bug 1518663) for Browser-Chrome failures in browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js. CLOSED TREE
parent 82007d97
......@@ -552,7 +552,6 @@ var Policies = {
onDownloadFailed: () => {
install.removeListener(listener);
log.error(`Download failed - ${location}`);
clearRunOnceModification("extensionsInstall");
},
onInstallFailed: () => {
install.removeListener(listener);
......@@ -1144,16 +1143,6 @@ async function runOncePerModification(actionName, policyValue, callback) {
return callback();
}
/**
* clearRunOnceModification
*
* Helper function that clears a runOnce policy.
*/
function clearRunOnceModification(actionName) {
let prefName = `browser.policies.runOncePerModification.${actionName}`;
Services.prefs.clearUserPref(prefName);
}
let gChromeURLSBlocked = false;
// If any about page is blocked, we block the loading of all
......
......@@ -92,27 +92,6 @@ add_task(async function test_addon_uninstall() {
is(addon, null, "Addon should be uninstalled.");
});
add_task(async function test_addon_download_failure() {
// Test that if the download fails, the runOnce pref
// is cleared so that the dowbnload will happen again
let installPromise = wait_for_addon_install();
await setupPolicyEngineWithJson({
"policies": {
"Extensions": {
"Install": [
`${BASE_URL}/policytest_invalid.xpi`,
],
},
},
});
try {
await installPromise;
} catch (e) {}
is(Services.prefs.prefHasUserValue("browser.policies.runOncePerModification.extensionsInstall"), false, "runOnce pref should be unset");
});
function wait_for_addon_install() {
return new Promise((resolve, reject) => {
AddonManager.addInstallListener({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment