michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: function test() { michael@0: function checkLastSuccess() { michael@0: let lastSuccess = Services.prefs.getIntPref("toolkit.startup.last_success"); michael@0: let si = Services.startup.getStartupInfo(); michael@0: is(lastSuccess, parseInt(si["main"].getTime() / 1000, 10), michael@0: "Startup tracking pref should be set after a delay at the end of startup"); michael@0: finish(); michael@0: } michael@0: michael@0: if (Services.prefs.getPrefType("toolkit.startup.max_resumed_crashes") == Services.prefs.PREF_INVALID) { michael@0: info("Skipping this test since startup crash detection is disabled"); michael@0: return; michael@0: } michael@0: michael@0: const startupCrashEndDelay = 35 * 1000; michael@0: waitForExplicitFinish(); michael@0: requestLongerTimeout(2); michael@0: setTimeout(checkLastSuccess, startupCrashEndDelay); michael@0: }