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 | MARIONETTE_TIMEOUT = 60000; |
michael@0 | 5 | MARIONETTE_HEAD_JS = 'head.js'; |
michael@0 | 6 | |
michael@0 | 7 | let outNumber = "5555551111"; |
michael@0 | 8 | let outgoingCall; |
michael@0 | 9 | |
michael@0 | 10 | function dial() { |
michael@0 | 11 | log("Make an outgoing call."); |
michael@0 | 12 | telephony.dial(outNumber).then(call => { |
michael@0 | 13 | outgoingCall = call; |
michael@0 | 14 | outgoingCall.onalerting = function onalerting(event) { |
michael@0 | 15 | log("Received 'alerting' call event."); |
michael@0 | 16 | answer(); |
michael@0 | 17 | }; |
michael@0 | 18 | }); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | function answer() { |
michael@0 | 22 | log("Answering the outgoing call."); |
michael@0 | 23 | |
michael@0 | 24 | outgoingCall.onconnected = function onconnectedOut(event) { |
michael@0 | 25 | log("Received 'connected' call event for the original outgoing call."); |
michael@0 | 26 | // just some code to keep call active for awhile |
michael@0 | 27 | callStartTime = Date.now(); |
michael@0 | 28 | waitFor(cleanUp,function() { |
michael@0 | 29 | callDuration = Date.now() - callStartTime; |
michael@0 | 30 | log("Waiting while call is active, call duration (ms): " + callDuration); |
michael@0 | 31 | return(callDuration >= 2000); |
michael@0 | 32 | }); |
michael@0 | 33 | }; |
michael@0 | 34 | emulator.run("gsm accept " + outNumber); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | function cleanUp(){ |
michael@0 | 38 | outgoingCall.hangUp(); |
michael@0 | 39 | ok("passed"); |
michael@0 | 40 | finish(); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | startTest(function() { |
michael@0 | 44 | dial(); |
michael@0 | 45 | }); |