blob: 11547e37dc02998f54a114ddc82839888db6b1f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that expiration runs on idle-daily.
add_task(async function test_expiration_on_idle_daily() {
// Set interval to a large value so we don't expire on it.
setInterval(3600); // 1h
let expirationPromise = TestUtils.topicObserved(
PlacesUtils.TOPIC_EXPIRATION_FINISHED
);
let expire = Cc["@mozilla.org/places/expiration;1"].getService(
Ci.nsIObserver
);
expire.observe(null, "idle-daily", null);
await expirationPromise;
});
|