michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // Check that TelemetryPing notifies correctly on idle-daily. michael@0: michael@0: const Cu = Components.utils; michael@0: michael@0: Cu.import("resource://gre/modules/Services.jsm", this); michael@0: Cu.import("resource://gre/modules/TelemetryPing.jsm", this); michael@0: michael@0: function run_test() { michael@0: do_test_pending(); michael@0: michael@0: Services.obs.addObserver(function observeTelemetry() { michael@0: Services.obs.removeObserver(observeTelemetry, "gather-telemetry"); michael@0: do_test_finished(); michael@0: }, "gather-telemetry", false); michael@0: michael@0: TelemetryPing.observe(null, "idle-daily", null); michael@0: }