1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryPing_idle.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +// Check that TelemetryPing notifies correctly on idle-daily. 1.8 + 1.9 +const Cu = Components.utils; 1.10 + 1.11 +Cu.import("resource://gre/modules/Services.jsm", this); 1.12 +Cu.import("resource://gre/modules/TelemetryPing.jsm", this); 1.13 + 1.14 +function run_test() { 1.15 + do_test_pending(); 1.16 + 1.17 + Services.obs.addObserver(function observeTelemetry() { 1.18 + Services.obs.removeObserver(observeTelemetry, "gather-telemetry"); 1.19 + do_test_finished(); 1.20 + }, "gather-telemetry", false); 1.21 + 1.22 + TelemetryPing.observe(null, "idle-daily", null); 1.23 +}