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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 *
8 * Date: 26 September 2003
9 * SUMMARY: Regexp conformance test
10 *
11 * See http://bugzilla.mozilla.org/show_bug.cgi?id=220367
12 *
13 */
14 //-----------------------------------------------------------------------------
15 var UBound = 0;
16 var BUGNUMBER = 220367;
17 var summary = 'Regexp conformance test';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
25 var re = /(a)|(b)/;
27 re.test('a');
28 status = inSection(1);
29 actual = RegExp.$1;
30 expect = 'a';
31 addThis();
33 status = inSection(2);
34 actual = RegExp.$2;
35 expect = '';
36 addThis();
38 re.test('b');
39 status = inSection(3);
40 actual = RegExp.$1;
41 expect = '';
42 addThis();
44 status = inSection(4);
45 actual = RegExp.$2;
46 expect = 'b';
47 addThis();
51 //-----------------------------------------------------------------------------
52 test();
53 //-----------------------------------------------------------------------------
57 function addThis()
58 {
59 statusitems[UBound] = status;
60 actualvalues[UBound] = actual;
61 expectedvalues[UBound] = expect;
62 UBound++;
63 }
66 function test()
67 {
68 enterFunc('test');
69 printBugNumber(BUGNUMBER);
70 printStatus(summary);
72 for (var i=0; i<UBound; i++)
73 {
74 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
75 }
77 exitFunc ('test');
78 }