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.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | var gClient; |
michael@0 | 5 | var gDebuggee; |
michael@0 | 6 | |
michael@0 | 7 | function run_test() |
michael@0 | 8 | { |
michael@0 | 9 | initTestDebuggerServer(); |
michael@0 | 10 | gDebuggee = testGlobal("test-1"); |
michael@0 | 11 | DebuggerServer.addTestGlobal(gDebuggee); |
michael@0 | 12 | |
michael@0 | 13 | let transport = DebuggerServer.connectPipe(); |
michael@0 | 14 | gClient = new DebuggerClient(transport); |
michael@0 | 15 | gClient.connect(function(aType, aTraits) { |
michael@0 | 16 | attachTestTab(gClient, "test-1", function(aReply, aTabClient) { |
michael@0 | 17 | test_attach(aTabClient); |
michael@0 | 18 | }); |
michael@0 | 19 | }); |
michael@0 | 20 | do_test_pending(); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | function test_attach(aTabClient) |
michael@0 | 24 | { |
michael@0 | 25 | aTabClient.attachThread({}, function(aResponse, aThreadClient) { |
michael@0 | 26 | do_check_eq(aThreadClient.state, "paused"); |
michael@0 | 27 | aThreadClient.resume(cleanup); |
michael@0 | 28 | }); |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | function cleanup() |
michael@0 | 32 | { |
michael@0 | 33 | gClient.addListener("closed", function(aEvent) { |
michael@0 | 34 | do_test_finished(); |
michael@0 | 35 | }); |
michael@0 | 36 | gClient.close(); |
michael@0 | 37 | } |