js/src/tests/js1_3/regress/new-001.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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    File Name:          new-001.js
     9    Section:
    10    Description:
    12    http://scopus.mcom.com/bugsplat/show_bug.cgi?id=76103
    14    Author:             christine@netscape.com
    15    Date:               12 november 1997
    16 */
    17 var SECTION = "new-001";
    18 var VERSION = "JS1_3";
    19 var TITLE   = "new-001";
    20 var BUGNUMBER="31567";
    22 startTest();
    23 writeHeaderToLog( SECTION + " "+ TITLE);
    25 function Test_One (x) {
    26   this.v = x+1;
    27   return x*2
    28     }
    30 function Test_Two( x, y ) {
    31   this.v = x;
    32   return y;
    33 }
    35 new TestCase(
    36   SECTION,
    37   "Test_One(18)",
    38   36,
    39   Test_One(18) );
    41 new TestCase(
    42   SECTION,
    43   "new Test_One(18)",
    44   "[object Object]",
    45   new Test_One(18) +"" );
    47 new TestCase(
    48   SECTION,
    49   "new Test_One(18).v",
    50   19,
    51   new Test_One(18).v );
    53 new TestCase(
    54   SECTION,
    55   "Test_Two(2,7)",
    56   7,
    57   Test_Two(2,7) );
    59 new TestCase(
    60   SECTION,
    61   "new Test_Two(2,7)",
    62   "[object Object]",
    63   new Test_Two(2,7) +"" );
    65 new TestCase(
    66   SECTION,
    67   "new Test_Two(2,7).v",
    68   2,
    69   new Test_Two(2,7).v );
    71 new TestCase(
    72   SECTION,
    73   "new (Function)(\"x\", \"return x+3\")(5,6)",
    74   8,
    75   new (Function)("x","return x+3")(5,6) );
    77 new TestCase(
    78   SECTION,
    79   "new new Test_Two(String, 2).v(0123)",
    80   "83",
    81   new new Test_Two(String, 2).v(0123) +"");
    83 new TestCase(
    84   SECTION,
    85   "new new Test_Two(String, 2).v(0123).length",
    86   2,
    87   new new Test_Two(String, 2).v(0123).length );
    89 test();

mercurial