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 | File Name: tostring_1.js |
michael@0 | 10 | ECMA Section: Array.toString() |
michael@0 | 11 | Description: |
michael@0 | 12 | |
michael@0 | 13 | This checks the ToString value of Array objects under JavaScript 1.2. |
michael@0 | 14 | |
michael@0 | 15 | Author: christine@netscape.com |
michael@0 | 16 | Date: 12 november 1997 |
michael@0 | 17 | */ |
michael@0 | 18 | |
michael@0 | 19 | var SECTION = "JS1_2"; |
michael@0 | 20 | var VERSION = "JS1_2"; |
michael@0 | 21 | startTest(); |
michael@0 | 22 | var TITLE = "Array.toString()"; |
michael@0 | 23 | |
michael@0 | 24 | writeHeaderToLog( SECTION + " "+ TITLE); |
michael@0 | 25 | |
michael@0 | 26 | var a = new Array(); |
michael@0 | 27 | |
michael@0 | 28 | var VERSION = 0; |
michael@0 | 29 | |
michael@0 | 30 | if ( version() == 120 ) { |
michael@0 | 31 | VERSION = "120"; |
michael@0 | 32 | } else { |
michael@0 | 33 | VERSION = ""; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | new TestCase ( SECTION, |
michael@0 | 37 | "var a = new Array(); a.toString()", |
michael@0 | 38 | ( VERSION == "120" ? "[]" : "" ), |
michael@0 | 39 | a.toString() ); |
michael@0 | 40 | |
michael@0 | 41 | a[0] = void 0; |
michael@0 | 42 | |
michael@0 | 43 | new TestCase ( SECTION, |
michael@0 | 44 | "a[0] = void 0; a.toString()", |
michael@0 | 45 | ( VERSION == "120" ? "[, ]" : "" ), |
michael@0 | 46 | a.toString() ); |
michael@0 | 47 | |
michael@0 | 48 | |
michael@0 | 49 | new TestCase( SECTION, |
michael@0 | 50 | "a.length", |
michael@0 | 51 | 1, |
michael@0 | 52 | a.length ); |
michael@0 | 53 | |
michael@0 | 54 | a[1] = void 0; |
michael@0 | 55 | |
michael@0 | 56 | new TestCase( SECTION, |
michael@0 | 57 | "a[1] = void 0; a.toString()", |
michael@0 | 58 | ( VERSION == "120" ? "[, , ]" : "," ), |
michael@0 | 59 | a.toString() ); |
michael@0 | 60 | |
michael@0 | 61 | a[1] = "hi"; |
michael@0 | 62 | |
michael@0 | 63 | new TestCase( SECTION, |
michael@0 | 64 | "a[1] = \"hi\"; a.toString()", |
michael@0 | 65 | ( VERSION == "120" ? "[, \"hi\"]" : ",hi" ), |
michael@0 | 66 | a.toString() ); |
michael@0 | 67 | |
michael@0 | 68 | a[2] = void 0; |
michael@0 | 69 | |
michael@0 | 70 | new TestCase( SECTION, |
michael@0 | 71 | "a[2] = void 0; a.toString()", |
michael@0 | 72 | ( VERSION == "120" ?"[, \"hi\", , ]":",hi,"), |
michael@0 | 73 | a.toString() ); |
michael@0 | 74 | |
michael@0 | 75 | var b = new Array(1000); |
michael@0 | 76 | var bstring = ""; |
michael@0 | 77 | for ( blen=0; blen<999; blen++) { |
michael@0 | 78 | bstring += ","; |
michael@0 | 79 | } |
michael@0 | 80 | |
michael@0 | 81 | |
michael@0 | 82 | new TestCase ( SECTION, |
michael@0 | 83 | "var b = new Array(1000); b.toString()", |
michael@0 | 84 | ( VERSION == "120" ? "[1000]" : bstring ), |
michael@0 | 85 | b.toString() ); |
michael@0 | 86 | |
michael@0 | 87 | |
michael@0 | 88 | new TestCase( SECTION, |
michael@0 | 89 | "b.length", |
michael@0 | 90 | ( VERSION == "120" ? 1 : 1000 ), |
michael@0 | 91 | b.length ); |
michael@0 | 92 | |
michael@0 | 93 | test(); |