Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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 }