diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-30 08:45:46 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-30 08:45:46 +0100 |
commit | 3d2dbf279f4ec1fa44ce79c8f692c38e561c6625 (patch) | |
tree | f24bd4ac72cea5a849486a877968664bcc9e70ea /services/sync/tests/unit/test_block_sync.js | |
parent | e156a64a5bd630e1a995f667852c905e4e228f93 (diff) | |
download | UXP-3d2dbf279f4ec1fa44ce79c8f692c38e561c6625.tar UXP-3d2dbf279f4ec1fa44ce79c8f692c38e561c6625.tar.gz UXP-3d2dbf279f4ec1fa44ce79c8f692c38e561c6625.tar.lz UXP-3d2dbf279f4ec1fa44ce79c8f692c38e561c6625.tar.xz UXP-3d2dbf279f4ec1fa44ce79c8f692c38e561c6625.zip |
Remove healthreport telemetry module from Sync + tests
Diffstat (limited to 'services/sync/tests/unit/test_block_sync.js')
-rw-r--r-- | services/sync/tests/unit/test_block_sync.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/services/sync/tests/unit/test_block_sync.js b/services/sync/tests/unit/test_block_sync.js deleted file mode 100644 index f83b7b740..000000000 --- a/services/sync/tests/unit/test_block_sync.js +++ /dev/null @@ -1,37 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ -Cu.import("resource://services-sync/main.js"); -Cu.import("resource://services-sync/util.js"); - -// Simple test for block/unblock. -add_task(function *() { - Assert.ok(!Weave.Service.scheduler.isBlocked, "sync is not blocked.") - Assert.ok(!Svc.Prefs.has("scheduler.blocked-until"), "have no blocked pref"); - Weave.Service.scheduler.blockSync(); - - Assert.ok(Weave.Service.scheduler.isBlocked, "sync is blocked.") - Assert.ok(Svc.Prefs.has("scheduler.blocked-until"), "have the blocked pref"); - - Weave.Service.scheduler.unblockSync(); - Assert.ok(!Weave.Service.scheduler.isBlocked, "sync is not blocked.") - Assert.ok(!Svc.Prefs.has("scheduler.blocked-until"), "have no blocked pref"); - - // now check the "until" functionality. - let until = Date.now() + 1000; - Weave.Service.scheduler.blockSync(until); - Assert.ok(Weave.Service.scheduler.isBlocked, "sync is blocked.") - Assert.ok(Svc.Prefs.has("scheduler.blocked-until"), "have the blocked pref"); - - // wait for 'until' to pass. - yield new Promise((resolve, reject) => { - CommonUtils.namedTimer(resolve, 1000, {}, "timer"); - }); - - // should have automagically unblocked and removed the pref. - Assert.ok(!Weave.Service.scheduler.isBlocked, "sync is not blocked.") - Assert.ok(!Svc.Prefs.has("scheduler.blocked-until"), "have no blocked pref"); -}); - -function run_test() { - run_next_test(); -} |