js/src/tests/js1_5/Regress/regress-102725.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  * Date: 09 October 2001
     8  *
     9  * SUMMARY: Regression test for Bugzilla bug 102725
    10  * See http://bugzilla.mozilla.org/show_bug.cgi?id=102725
    11  * "gcc -O2 problems converting numbers to strings"
    12  *
    13  */
    14 //-----------------------------------------------------------------------------
    15 var UBound = 0;
    16 var BUGNUMBER = 102725;
    17 var summary = 'Testing converting numbers to strings';
    18 var status = '';
    19 var statusitems = [];
    20 var actual = '';
    21 var actualvalues = [];
    22 var expect= '';
    23 var expectedvalues = [];
    26 /*
    27  * Successive calls to foo.toString() were producing different answers!
    28  */
    29 status = inSection(1);
    30 foo = (new Date()).getTime();
    31 actual = foo.toString();
    32 expect = foo.toString();
    33 addThis();
    37 //-----------------------------------------------------------------------------
    38 test();
    39 //-----------------------------------------------------------------------------
    43 function addThis()
    44 {
    45   statusitems[UBound] = status;
    46   actualvalues[UBound] = actual;
    47   expectedvalues[UBound] = expect;
    48   UBound++;
    49 }
    52 function test()
    53 {
    54   enterFunc ('test');
    55   printBugNumber(BUGNUMBER);
    56   printStatus (summary);
    58   for (var i=0; i<UBound; i++)
    59   {
    60     reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
    61   }
    63   exitFunc ('test');
    64 }

mercurial