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: proto_9.js |
michael@0 | 9 | Section: |
michael@0 | 10 | Description: Local versus Inherited Values |
michael@0 | 11 | |
michael@0 | 12 | This tests Object Hierarchy and Inheritance, as described in the document |
michael@0 | 13 | Object Hierarchy and Inheritance in JavaScript, last modified on 12/18/97 |
michael@0 | 14 | 15:19:34 on http://devedge.netscape.com/. Current URL: |
michael@0 | 15 | http://devedge.netscape.com/docs/manuals/communicator/jsobj/contents.htm |
michael@0 | 16 | |
michael@0 | 17 | This tests the syntax ObjectName.prototype = new PrototypeObject using the |
michael@0 | 18 | Employee example in the document referenced above. |
michael@0 | 19 | |
michael@0 | 20 | This tests |
michael@0 | 21 | |
michael@0 | 22 | Author: christine@netscape.com |
michael@0 | 23 | Date: 12 november 1997 |
michael@0 | 24 | */ |
michael@0 | 25 | |
michael@0 | 26 | var SECTION = "proto_9"; |
michael@0 | 27 | var VERSION = "JS1_3"; |
michael@0 | 28 | var TITLE = "Local versus Inherited Values"; |
michael@0 | 29 | |
michael@0 | 30 | startTest(); |
michael@0 | 31 | writeHeaderToLog( SECTION + " "+ TITLE); |
michael@0 | 32 | |
michael@0 | 33 | function Employee ( name, dept ) { |
michael@0 | 34 | this.name = name || ""; |
michael@0 | 35 | this.dept = dept || "general"; |
michael@0 | 36 | } |
michael@0 | 37 | function WorkerBee ( name, dept, projs ) { |
michael@0 | 38 | this.projects = new Array(); |
michael@0 | 39 | } |
michael@0 | 40 | WorkerBee.prototype = new Employee(); |
michael@0 | 41 | |
michael@0 | 42 | var pat = new WorkerBee() |
michael@0 | 43 | |
michael@0 | 44 | Employee.prototype.specialty = "none"; |
michael@0 | 45 | Employee.prototype.name = "Unknown"; |
michael@0 | 46 | |
michael@0 | 47 | Array.prototype.getClass = Object.prototype.toString; |
michael@0 | 48 | |
michael@0 | 49 | // Pat, the WorkerBee |
michael@0 | 50 | |
michael@0 | 51 | new TestCase( SECTION, |
michael@0 | 52 | "pat.name", |
michael@0 | 53 | "", |
michael@0 | 54 | pat.name ); |
michael@0 | 55 | |
michael@0 | 56 | new TestCase( SECTION, |
michael@0 | 57 | "pat.dept", |
michael@0 | 58 | "general", |
michael@0 | 59 | pat.dept ); |
michael@0 | 60 | |
michael@0 | 61 | new TestCase( SECTION, |
michael@0 | 62 | "pat.projects.getClass", |
michael@0 | 63 | "[object Array]", |
michael@0 | 64 | pat.projects.getClass() ); |
michael@0 | 65 | |
michael@0 | 66 | new TestCase( SECTION, |
michael@0 | 67 | "pat.projects.length", |
michael@0 | 68 | 0, |
michael@0 | 69 | pat.projects.length ); |
michael@0 | 70 | |
michael@0 | 71 | test(); |