Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
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 }