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 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | |
michael@0 | 7 | /** |
michael@0 | 8 | File Name: 10.1.5-4.js |
michael@0 | 9 | ECMA Section: 10.1.5 Global Object |
michael@0 | 10 | Description: |
michael@0 | 11 | There is a unique global object which is created before control enters |
michael@0 | 12 | any execution context. Initially the global object has the following |
michael@0 | 13 | properties: |
michael@0 | 14 | |
michael@0 | 15 | Built-in objects such as Math, String, Date, parseInt, etc. These have |
michael@0 | 16 | attributes { DontEnum }. |
michael@0 | 17 | |
michael@0 | 18 | Additional host defined properties. This may include a property whose |
michael@0 | 19 | value is the global object itself, for example window in HTML. |
michael@0 | 20 | |
michael@0 | 21 | As control enters execution contexts, and as ECMAScript code is executed, |
michael@0 | 22 | additional properties may be added to the global object and the initial |
michael@0 | 23 | properties may be changed. |
michael@0 | 24 | |
michael@0 | 25 | Author: christine@netscape.com |
michael@0 | 26 | Date: 12 november 1997 |
michael@0 | 27 | */ |
michael@0 | 28 | var SECTION = "10.5.1-4"; |
michael@0 | 29 | var VERSION = "ECMA_1"; |
michael@0 | 30 | startTest(); |
michael@0 | 31 | |
michael@0 | 32 | writeHeaderToLog( SECTION + " Global Object"); |
michael@0 | 33 | |
michael@0 | 34 | new TestCase( "SECTION", "Anonymous Code check" ); |
michael@0 | 35 | |
michael@0 | 36 | |
michael@0 | 37 | var EVAL_STRING = 'if ( Object == null ) { gTestcases[0].reason += " Object == null" ; }' + |
michael@0 | 38 | 'if ( Function == null ) { gTestcases[0].reason += " Function == null"; }' + |
michael@0 | 39 | 'if ( String == null ) { gTestcases[0].reason += " String == null"; }' + |
michael@0 | 40 | 'if ( Array == null ) { gTestcases[0].reason += " Array == null"; }' + |
michael@0 | 41 | 'if ( Number == null ) { gTestcases[0].reason += " Function == null";}' + |
michael@0 | 42 | 'if ( Math == null ) { gTestcases[0].reason += " Math == null"; }' + |
michael@0 | 43 | 'if ( Boolean == null ) { gTestcases[0].reason += " Boolean == null"; }' + |
michael@0 | 44 | 'if ( Date == null ) { gTestcases[0].reason += " Date == null"; }' + |
michael@0 | 45 | 'if ( eval == null ) { gTestcases[0].reason += " eval == null"; }' + |
michael@0 | 46 | 'if ( parseInt == null ) { gTestcases[0].reason += " parseInt == null"; }' ; |
michael@0 | 47 | |
michael@0 | 48 | var NEW_FUNCTION = new Function( EVAL_STRING ); |
michael@0 | 49 | |
michael@0 | 50 | if ( gTestcases[0].reason != "" ) { |
michael@0 | 51 | gTestcases[0].actual = "fail"; |
michael@0 | 52 | } else { |
michael@0 | 53 | gTestcases[0].actual = "pass"; |
michael@0 | 54 | } |
michael@0 | 55 | gTestcases[0].expect = "pass"; |
michael@0 | 56 | |
michael@0 | 57 | test(); |