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 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /**
6 * Test preventive maintenance runTasks.
7 */
9 // Include PlacesDBUtils module.
10 Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
12 function run_test() {
13 do_test_pending();
14 PlacesDBUtils.runTasks([PlacesDBUtils.reindex], function(aLog) {
15 let sections = [];
16 let positives = [];
17 let negatives = [];
18 let infos = [];
20 aLog.forEach(function (aMsg) {
21 print (aMsg);
22 switch (aMsg.substr(0, 1)) {
23 case "+":
24 positives.push(aMsg);
25 break;
26 case "-":
27 negatives.push(aMsg);
28 break;
29 case ">":
30 sections.push(aMsg);
31 break;
32 default:
33 infos.push(aMsg);
34 }
35 });
37 print("Check that we have run all sections.");
38 do_check_eq(sections.length, 1);
39 print("Check that we have no negatives.");
40 do_check_false(!!negatives.length);
41 print("Check that we have positives.");
42 do_check_true(!!positives.length);
44 do_test_finished();
45 });
46 }