js/src/tests/ecma/ExecutionContexts/10.1.3-1.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:          10.1.3-1.js
     9    ECMA Section:       10.1.3
    10    Description:
    12    For each formal parameter, as defined in the FormalParameterList, create
    13    a property of the variable object whose name is the Identifier and whose
    14    attributes are determined by the type of code. The values of the
    15    parameters are supplied by the caller. If the caller supplies fewer
    16    parameter values than there are formal parameters, the extra formal
    17    parameters have value undefined. If two or more formal parameters share
    18    the same name, hence the same property, the corresponding property is
    19    given the value that was supplied for the last parameter with this name.
    20    If the value of this last parameter was not supplied by the caller,
    21    the value of the corresponding property is undefined.
    24    http://scopus.mcom.com/bugsplat/show_bug.cgi?id=104191
    26    Author:             christine@netscape.com
    27    Date:               12 november 1997
    28 */
    30 var SECTION = "10.1.3-1";
    31 var VERSION = "ECMA_1";
    32 var TITLE   = "Variable Instantiation:  Formal Parameters";
    33 var BUGNUMBER="104191";
    34 startTest();
    36 writeHeaderToLog( SECTION + " "+ TITLE);
    38 var myfun1 = new Function( "a", "a", "return a" );
    39 var myfun2 = new Function( "a", "b", "a", "return a" );
    41 function myfun3(a, b, a) {
    42   return a;
    43 }
    45 // myfun1, myfun2, myfun3 tostring
    48 new TestCase(
    49   SECTION,
    50   String(myfun2) +"; myfun2(2,4,8)",
    51   8,
    52   myfun2(2,4,8) );
    54 new TestCase(
    55   SECTION,
    56   "myfun2(2,4)",
    57   void 0,
    58   myfun2(2,4));
    60 new TestCase(
    61   SECTION,
    62   String(myfun3) +"; myfun3(2,4,8)",
    63   8,
    64   myfun3(2,4,8) );
    66 new TestCase(
    67   SECTION,
    68   "myfun3(2,4)",
    69   void 0,
    70   myfun3(2,4) );
    72 test();

mercurial