js/src/tests/js1_5/Array/11.1.4.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/. */
     6 //-----------------------------------------------------------------------------
     7 var BUGNUMBER = 260106;
     8 var summary = 'Elisons in Array literals should not be enumed';
     9 var actual = '';
    10 var expect = '';
    11 var status;
    12 var prop;
    13 var array;
    15 printBugNumber(BUGNUMBER);
    16 printStatus (summary);
    18 status = summary + ' ' + inSection(1) + ' [,1] ';
    19 array = [,1];
    20 actual = '';
    21 expect = '1';
    22 for (prop in array)
    23 {
    24   if (prop != 'length')
    25   {
    26     actual += prop;
    27   }
    28 }
    29 reportCompare(expect, actual, status);
    31 status = summary + ' ' + inSection(2) + ' [,,1] ';
    32 array = [,,1];
    33 actual = '';
    34 expect = '2';
    35 for (prop in array)
    36 {
    37   if (prop != 'length')
    38   {
    39     actual += prop;
    40   }
    41 }
    42 reportCompare(expect, actual, status);
    44 status = summary + ' ' + inSection(3) + ' [1,] ';
    45 array = [1,];
    46 actual = '';
    47 expect = '0';
    48 for (prop in array)
    49 {
    50   if (prop != 'length')
    51   {
    52     actual += prop;
    53   }
    54 }
    55 reportCompare(expect, actual, status);
    57 status = summary + ' ' + inSection(4) + ' [1,,] ';
    58 array = [1,,];
    59 actual = '';
    60 expect = '0';
    61 for (prop in array)
    62 {
    63   if (prop != 'length')
    64   {
    65     actual += prop;
    66   }
    67 }
    68 reportCompare(expect, actual, status);

mercurial