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 | // |reftest| skip -- obsolete test |
michael@0 | 2 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | Filename: string_split.js |
michael@0 | 10 | Description: 'Tests the split method on Strings using regular expressions' |
michael@0 | 11 | |
michael@0 | 12 | Author: Nick Lerissa |
michael@0 | 13 | Date: March 11, 1998 |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | var SECTION = 'As described in Netscape doc "Whats new in JavaScript 1.2"'; |
michael@0 | 17 | var VERSION = 'no version'; |
michael@0 | 18 | startTest(); |
michael@0 | 19 | var TITLE = 'String: split'; |
michael@0 | 20 | |
michael@0 | 21 | writeHeaderToLog('Executing script: string_split.js'); |
michael@0 | 22 | writeHeaderToLog( SECTION + " "+ TITLE); |
michael@0 | 23 | |
michael@0 | 24 | |
michael@0 | 25 | // 'a b c de f'.split(/\s/) |
michael@0 | 26 | new TestCase ( SECTION, "'a b c de f'.split(/\s/)", |
michael@0 | 27 | String(["a","b","c","de","f"]), String('a b c de f'.split(/\s/))); |
michael@0 | 28 | |
michael@0 | 29 | // 'a b c de f'.split(/\s/,3) |
michael@0 | 30 | new TestCase ( SECTION, "'a b c de f'.split(/\s/,3)", |
michael@0 | 31 | String(["a","b","c"]), String('a b c de f'.split(/\s/,3))); |
michael@0 | 32 | |
michael@0 | 33 | // 'a b c de f'.split(/X/) |
michael@0 | 34 | new TestCase ( SECTION, "'a b c de f'.split(/X/)", |
michael@0 | 35 | String(["a b c de f"]), String('a b c de f'.split(/X/))); |
michael@0 | 36 | |
michael@0 | 37 | // 'dfe23iu 34 =+65--'.split(/\d+/) |
michael@0 | 38 | new TestCase ( SECTION, "'dfe23iu 34 =+65--'.split(/\d+/)", |
michael@0 | 39 | String(["dfe","iu "," =+","--"]), String('dfe23iu 34 =+65--'.split(/\d+/))); |
michael@0 | 40 | |
michael@0 | 41 | // 'dfe23iu 34 =+65--'.split(new RegExp('\d+')) |
michael@0 | 42 | new TestCase ( SECTION, "'dfe23iu 34 =+65--'.split(new RegExp('\\d+'))", |
michael@0 | 43 | String(["dfe","iu "," =+","--"]), String('dfe23iu 34 =+65--'.split(new RegExp('\\d+')))); |
michael@0 | 44 | |
michael@0 | 45 | // 'abc'.split(/[a-z]/) |
michael@0 | 46 | new TestCase ( SECTION, "'abc'.split(/[a-z]/)", |
michael@0 | 47 | String(["","",""]), String('abc'.split(/[a-z]/))); |
michael@0 | 48 | |
michael@0 | 49 | // 'abc'.split(/[a-z]/) |
michael@0 | 50 | new TestCase ( SECTION, "'abc'.split(/[a-z]/)", |
michael@0 | 51 | String(["","",""]), String('abc'.split(/[a-z]/))); |
michael@0 | 52 | |
michael@0 | 53 | // 'abc'.split(new RegExp('[a-z]')) |
michael@0 | 54 | new TestCase ( SECTION, "'abc'.split(new RegExp('[a-z]'))", |
michael@0 | 55 | String(["","",""]), String('abc'.split(new RegExp('[a-z]')))); |
michael@0 | 56 | |
michael@0 | 57 | // 'abc'.split(new RegExp('[a-z]')) |
michael@0 | 58 | new TestCase ( SECTION, "'abc'.split(new RegExp('[a-z]'))", |
michael@0 | 59 | String(["","",""]), String('abc'.split(new RegExp('[a-z]')))); |
michael@0 | 60 | |
michael@0 | 61 | test(); |