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 "use strict";
6 const Profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler);
8 function check_actors(expect) {
9 do_check_eq(expect, DebuggerServer.tabActorFactories.hasOwnProperty("registeredActor1"));
10 do_check_eq(expect, DebuggerServer.tabActorFactories.hasOwnProperty("registeredActor2"));
12 do_check_eq(expect, DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor2"));
13 do_check_eq(expect, DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor1"));
14 }
16 function run_test()
17 {
18 DebuggerServer.init(function () { return true; });
19 // The xpcshell-test/ path maps to resource://test/
20 DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
21 DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
23 check_actors(true);
25 check_except(() => {
26 DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
27 });
28 check_except(() => {
29 DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
30 });
32 DebuggerServer.unregisterModule("xpcshell-test/registertestactors-01");
33 DebuggerServer.unregisterModule("xpcshell-test/registertestactors-02");
34 check_actors(false);
36 DebuggerServer.registerModule("xpcshell-test/registertestactors-01");
37 DebuggerServer.registerModule("xpcshell-test/registertestactors-02");
38 check_actors(true);
40 DebuggerServer.destroy();
41 check_actors(false);
42 }