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", test_attach); |
michael@0 | 17 | }); |
michael@0 | 18 | do_test_pending(); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | function test_attach(aResponse, aTabClient) |
michael@0 | 22 | { |
michael@0 | 23 | aTabClient.attachThread({}, function(aResponse, aThreadClient) { |
michael@0 | 24 | do_check_eq(aThreadClient.paused, true); |
michael@0 | 25 | aThreadClient.resume(function() { |
michael@0 | 26 | test_interrupt(aThreadClient); |
michael@0 | 27 | }); |
michael@0 | 28 | }); |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | function test_interrupt(aThreadClient) |
michael@0 | 32 | { |
michael@0 | 33 | do_check_eq(aThreadClient.paused, false); |
michael@0 | 34 | aThreadClient.interrupt(function(aResponse) { |
michael@0 | 35 | do_check_eq(aThreadClient.paused, true); |
michael@0 | 36 | aThreadClient.resume(function() { |
michael@0 | 37 | do_check_eq(aThreadClient.paused, false); |
michael@0 | 38 | cleanup(); |
michael@0 | 39 | }); |
michael@0 | 40 | }); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | function cleanup() |
michael@0 | 44 | { |
michael@0 | 45 | gClient.addListener("closed", function(aEvent) { |
michael@0 | 46 | do_test_finished(); |
michael@0 | 47 | }); |
michael@0 | 48 | gClient.close(); |
michael@0 | 49 | } |
michael@0 | 50 |