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 gDebuggee; |
michael@0 | 5 | var gClient; |
michael@0 | 6 | var gThreadClient; |
michael@0 | 7 | |
michael@0 | 8 | function run_test() |
michael@0 | 9 | { |
michael@0 | 10 | initTestDebuggerServer(); |
michael@0 | 11 | gDebuggee = addTestGlobal("test-grips"); |
michael@0 | 12 | |
michael@0 | 13 | gClient = new DebuggerClient(DebuggerServer.connectPipe()); |
michael@0 | 14 | gClient.connect(function() { |
michael@0 | 15 | attachTestTabAndResume(gClient, "test-grips", function(aResponse, aTabClient, aThreadClient) { |
michael@0 | 16 | gThreadClient = aThreadClient; |
michael@0 | 17 | test_banana_environment(); |
michael@0 | 18 | }); |
michael@0 | 19 | }); |
michael@0 | 20 | do_test_pending(); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | function test_banana_environment() |
michael@0 | 24 | { |
michael@0 | 25 | |
michael@0 | 26 | gThreadClient.addOneTimeListener("paused", |
michael@0 | 27 | function(aEvent, aPacket) { |
michael@0 | 28 | do_check_matches({type:"paused", frame: |
michael@0 | 29 | {environment: |
michael@0 | 30 | {type: "function", function: {name: "banana3"}, |
michael@0 | 31 | parent: |
michael@0 | 32 | {type: "block", bindings: {variables: {banana3:undefined}}, |
michael@0 | 33 | parent: |
michael@0 | 34 | {type: "function", function: {name: "banana2"}, |
michael@0 | 35 | parent: |
michael@0 | 36 | {type:"block", bindings: {variables: {banana2:undefined}}, |
michael@0 | 37 | parent: |
michael@0 | 38 | {type:"block", bindings: {variables: {banana2:undefined}}, |
michael@0 | 39 | parent: |
michael@0 | 40 | {type:"function", function: {name: "banana"}}}}}}}}}, |
michael@0 | 41 | aPacket, |
michael@0 | 42 | { Object:Object, Array:Array }); |
michael@0 | 43 | gThreadClient.resume(function () { |
michael@0 | 44 | finishClient(gClient); |
michael@0 | 45 | }); |
michael@0 | 46 | }); |
michael@0 | 47 | |
michael@0 | 48 | gDebuggee.eval("\ |
michael@0 | 49 | function banana(x) { \n\ |
michael@0 | 50 | return function banana2(y) { \n\ |
michael@0 | 51 | return function banana3(z) { \n\ |
michael@0 | 52 | debugger; \n\ |
michael@0 | 53 | }; \n\ |
michael@0 | 54 | }; \n\ |
michael@0 | 55 | } \n\ |
michael@0 | 56 | banana('x')('y')('z'); \n\ |
michael@0 | 57 | "); |
michael@0 | 58 | } |