michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function testSameVersion() { michael@0: let mozSettings = window.navigator.mozSettings; michael@0: let forceSent = false; michael@0: michael@0: mozSettings.addObserver("gecko.updateStatus", function statusObserver(setting) { michael@0: if (!forceSent) { michael@0: return; michael@0: } michael@0: michael@0: mozSettings.removeObserver("gecko.updateStatus", statusObserver); michael@0: is(setting.settingValue, "already-latest-version"); michael@0: cleanUp(); michael@0: }); michael@0: michael@0: sendContentEvent("force-update-check"); michael@0: forceSent = true; michael@0: } michael@0: michael@0: // Update lifecycle callbacks michael@0: function preUpdate() { michael@0: testSameVersion(); michael@0: }