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 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 const { 'classes': Cc, 'interfaces': Ci, 'utils': Cu } = Components;
8 let testGenerator = testSteps();
10 if (!window.runTest) {
11 window.runTest = function()
12 {
13 Cu.importGlobalProperties(["indexedDB"]);
15 SimpleTest.waitForExplicitFinish();
17 testGenerator.next();
18 }
19 }
21 function finishTest()
22 {
23 SimpleTest.executeSoon(function() {
24 testGenerator.close();
25 SimpleTest.finish();
26 });
27 }
29 function grabEventAndContinueHandler(event)
30 {
31 testGenerator.send(event);
32 }
34 function continueToNextStep()
35 {
36 SimpleTest.executeSoon(function() {
37 testGenerator.next();
38 });
39 }
41 function errorHandler(event)
42 {
43 throw new Error("indexedDB error, code " + event.target.error.name);
44 }