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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 */
6 // Disables security checking our updates which haven't been signed
7 Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
9 var ADDONS = [
10 "test_bug470377_1",
11 "test_bug470377_2",
12 "test_bug470377_3",
13 "test_bug470377_4",
14 "test_bug470377_5",
15 ];
17 Components.utils.import("resource://testing-common/httpd.js");
18 var server;
20 function run_test() {
21 do_test_pending();
22 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2", "2");
24 server = new HttpServer();
25 server.registerDirectory("/", do_get_file("data/test_bug470377"));
26 server.start(-1);
28 startupManager();
29 AddonManager.checkCompatibility = false;
31 installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() {
32 restartManager();
34 AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
35 "bug470377_2@tests.mozilla.org",
36 "bug470377_3@tests.mozilla.org",
37 "bug470377_4@tests.mozilla.org",
38 "bug470377_5@tests.mozilla.org"],
39 function([a1, a2, a3, a4, a5]) {
40 do_check_eq(a1, null);
41 do_check_neq(a2, null);
42 do_check_neq(a3, null);
43 do_check_neq(a4, null);
44 do_check_neq(a5, null);
46 server.stop(do_test_finished);
47 });
48 }, true);
49 }