diff --git a/browser/components/sessionstore/test/browser_522375.js b/browser/components/sessionstore/test/browser_522375.js index 50b74d6cde3..f32c625235a 100644 --- a/browser/components/sessionstore/test/browser_522375.js +++ b/browser/components/sessionstore/test/browser_522375.js @@ -1,17 +1,7 @@ function test() { var startup_info = Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(Components.interfaces.nsIAppStartup).getStartupInfo(); // No .process info on mac - - // Check if we encountered a telemetry error for the the process creation - // timestamp and turn the first test into a known failure. - var telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - var snapshot = telemetry.getHistogramById("STARTUP_MEASUREMENT_ERRORS") - .snapshot(); - - if (snapshot.counts[0] == 0) - ok(startup_info.process <= startup_info.main, "process created before main is run " + uneval(startup_info)); - else - todo(false, "An error occurred while recording the process creation timestamp, skipping this test"); + ok(startup_info.process <= startup_info.main, "process created before main is run " + uneval(startup_info)); // on linux firstPaint can happen after everything is loaded (especially with remote X) if (startup_info.firstPaint) diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 7ec9b825ea8..4656eaa9a8b 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -791,17 +791,14 @@ nsAppStartup::GetStartupInfo(JSContext* aCx, JS::Value* aRetval) PRTime ProcessCreationTimestamp = StartupTimeline::Get(StartupTimeline::PROCESS_CREATION); if (!ProcessCreationTimestamp) { - PRTime MainTimestamp = StartupTimeline::Get(StartupTimeline::MAIN); char *moz_app_restart = PR_GetEnv("MOZ_APP_RESTART"); if (moz_app_restart) { ProcessCreationTimestamp = nsCRT::atoll(moz_app_restart) * PR_USEC_PER_MSEC; } else { ProcessCreationTimestamp = CalculateProcessCreationTimestamp(); } - // Bug 670008 & 689256: Avoid obviously invalid process creation times - if ((PR_Now() <= ProcessCreationTimestamp) || - (ProcessCreationTimestamp > MainTimestamp)) - { + // Bug 670008: Avoid obviously invalid process creation times + if (PR_Now() <= ProcessCreationTimestamp) { ProcessCreationTimestamp = -1; Telemetry::Accumulate(Telemetry::STARTUP_MEASUREMENT_ERRORS, StartupTimeline::PROCESS_CREATION); } diff --git a/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js b/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js index 6ecf129c769..6f074c17c62 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js +++ b/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js @@ -8,7 +8,6 @@ let tmp = {}; Components.utils.import("resource://gre/modules/AddonRepository.jsm", tmp); let AddonRepository = tmp.AddonRepository; -var gTelemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); var gManagerWindow; var gProvider; @@ -42,38 +41,13 @@ function test() { } info(url.query); - // Check if we encountered telemetry errors and turn the tests for which - // we don't have valid data into known failures. - let snapshot = gTelemetry.getHistogramById("STARTUP_MEASUREMENT_ERRORS") - .snapshot(); - - let tProcessValid = (snapshot.counts[0] == 0); - let tMainValid = tProcessValid && (snapshot.counts[2] == 0); - let tFirstPaintValid = tProcessValid && (snapshot.counts[5] == 0); - let tSessionRestoredValid = tProcessValid && (snapshot.counts[6] == 0); - let params = parseParams(url.query); is(params.appOS, Services.appinfo.OS, "OS should be correct"); is(params.appVersion, Services.appinfo.version, "Version should be correct"); - - if (tMainValid) { - ok(params.tMain >= 0, "Should be a sensible tMain"); - } else { - todo(false, "An error occurred while recording the startup timestamps, skipping this test"); - } - - if (tFirstPaintValid) { - ok(params.tFirstPaint >= 0, "Should be a sensible tFirstPaint"); - } else { - todo(false, "An error occurred while recording the startup timestamps, skipping this test"); - } - - if (tSessionRestoredValid) { - ok(params.tSessionRestored >= 0, "Should be a sensible tSessionRestored"); - } else { - todo(false, "An error occurred while recording the startup timestamps, skipping this test"); - } + ok(params.tMain >= 0, "Should be a sensible tMain"); + ok(params.tFirstPaint >= 0, "Should be a sensible tFirstPaint"); + ok(params.tSessionRestored >= 0, "Should be a sensible tSessionRestored"); gSeenRequest = true; }