fune/browser/base/content/test/appUpdate/browser_updatesMalformedXml.js
Doug Thayer f463069928 Bug 893505 - Simplify the application update UI r=chmanchester,enndeakin+6102,Gijs,rstrong
There's quite a few changes in here. At a high level, all we're trying to do
is to replace the old update popup with a less intrusive and more modern
doorhanger (set of doorhangers) for various update failure conditions.

MozReview-Commit-ID: 24sESMTosNX

--HG--
extra : rebase_source : ee0c1e00fe3f99e16388f0de17274ff97a3b9fcf
2017-03-21 13:50:09 -07:00

29 lines
993 B
JavaScript

add_task(function* testMalformedXml() {
const updateDetailsUrl = "http://example.com/details";
const maxBackgroundErrors = 10;
SpecialPowers.pushPrefEnv({set: [
[PREF_APP_UPDATE_BACKGROUNDMAXERRORS, maxBackgroundErrors],
[PREF_APP_UPDATE_URL_DETAILS, updateDetailsUrl]
]});
let updateParams = "xmlMalformed=1";
yield runUpdateTest(updateParams, maxBackgroundErrors, [
{
// if we fail 10 check attempts, then we want to just show the user a manual update
// workflow.
notificationId: "update-manual",
button: "button",
beforeClick() {
checkWhatsNewLink("update-manual-whats-new", updateDetailsUrl);
},
*cleanup() {
yield BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
is(gBrowser.selectedBrowser.currentURI.spec,
URL_MANUAL_UPDATE, "Landed on manual update page.")
gBrowser.removeTab(gBrowser.selectedTab);
gMenuButtonUpdateBadge.reset();
}
},
]);
});