js/src/tests/js1_5/Scope/regress-154693.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  *
     8  * Date:    26 Nov 2002
     9  * SUMMARY: Testing scope
    10  * See http://bugzilla.mozilla.org/show_bug.cgi?id=154693
    11  *
    12  */
    13 //-----------------------------------------------------------------------------
    14 var UBound = 0;
    15 var BUGNUMBER = 154693;
    16 var summary = 'Testing scope';
    17 var status = '';
    18 var statusitems = [];
    19 var actual = '';
    20 var actualvalues = [];
    21 var expect= '';
    22 var expectedvalues = [];
    25 function f()
    26 {
    27   function nested() {}
    28   return nested;
    29 }
    30 var f1 = f();
    31 var f2 = f();
    33 status = inSection(1);
    34 actual = (f1 != f2);
    35 expect = true;
    36 addThis();
    40 //-----------------------------------------------------------------------------
    41 test();
    42 //-----------------------------------------------------------------------------
    46 function addThis()
    47 {
    48   statusitems[UBound] = status;
    49   actualvalues[UBound] = actual;
    50   expectedvalues[UBound] = expect;
    51   UBound++;
    52 }
    55 function test()
    56 {
    57   enterFunc('test');
    58   printBugNumber(BUGNUMBER);
    59   printStatus(summary);
    61   for (var i=0; i<UBound; i++)
    62   {
    63     reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
    64   }
    66   exitFunc ('test');
    67 }

mercurial