Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 // Test that expiration runs on idle-daily.
6 function run_test() {
7 do_test_pending();
9 // Set interval to a large value so we don't expire on it.
10 setInterval(3600); // 1h
12 Services.obs.addObserver(function observeExpiration(aSubject, aTopic, aData) {
13 Services.obs.removeObserver(observeExpiration,
14 PlacesUtils.TOPIC_EXPIRATION_FINISHED);
15 do_test_finished();
16 }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
18 let expire = Cc["@mozilla.org/places/expiration;1"].
19 getService(Ci.nsIObserver);
20 expire.observe(null, "idle-daily", null);
21 }