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/. */
7 /**
8 Filename: source.js
9 Description: 'Tests RegExp attribute source'
11 Author: Nick Lerissa
12 Date: March 13, 1998
13 */
15 var SECTION = 'As described in Netscape doc "Whats new in JavaScript 1.2"';
16 var VERSION = 'no version';
17 startTest();
18 var TITLE = 'RegExp: source';
20 writeHeaderToLog('Executing script: source.js');
21 writeHeaderToLog( SECTION + " "+ TITLE);
24 // /xyz/g.source
25 new TestCase ( SECTION, "/xyz/g.source",
26 "xyz", /xyz/g.source);
28 // /xyz/.source
29 new TestCase ( SECTION, "/xyz/.source",
30 "xyz", /xyz/.source);
32 // /abc\\def/.source
33 new TestCase ( SECTION, "/abc\\\\def/.source",
34 "abc\\\\def", /abc\\def/.source);
36 // /abc[\b]def/.source
37 new TestCase ( SECTION, "/abc[\\b]def/.source",
38 "abc[\\b]def", /abc[\b]def/.source);
40 // (new RegExp('xyz')).source
41 new TestCase ( SECTION, "(new RegExp('xyz')).source",
42 "xyz", (new RegExp('xyz')).source);
44 // (new RegExp('xyz','g')).source
45 new TestCase ( SECTION, "(new RegExp('xyz','g')).source",
46 "xyz", (new RegExp('xyz','g')).source);
48 // (new RegExp('abc\\\\def')).source
49 new TestCase ( SECTION, "(new RegExp('abc\\\\\\\\def')).source",
50 "abc\\\\def", (new RegExp('abc\\\\def')).source);
52 // (new RegExp('abc[\\b]def')).source
53 new TestCase ( SECTION, "(new RegExp('abc[\\\\b]def')).source",
54 "abc[\\b]def", (new RegExp('abc[\\b]def')).source);
56 test();