Bug 1568994 - Convert Enterprise policy AppUpdateURL to work with the new update url mechanism r=mkaply,mhowell

Differential Revision: https://phabricator.services.mozilla.com/D45869
This commit is contained in:
Kirk Steuber
2020-03-24 22:03:27 +00:00
parent daae5946bc
commit 098a6f2024
3 changed files with 15 additions and 7 deletions

View File

@@ -3,6 +3,10 @@
"use strict";
let { Checker } = ChromeUtils.import(
"resource://gre/modules/UpdateService.jsm"
);
add_task(async function test_app_update_URL() {
await setupPolicyEngineWithJson({
policies: {
@@ -16,10 +20,8 @@ add_task(async function test_app_update_URL() {
"Engine is active"
);
// The app.update.url preference is read from the default preferences.
let expected = Services.prefs
.getDefaultBranch(null)
.getCharPref("app.update.url", undefined);
let checker = new Checker();
let expected = await checker.getUpdateURL();
equal("https://www.example.com/", expected, "Correct app update URL");
});