js/src/tests/js1_8/extensions/regress-417817.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 // |reftest| skip
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 //-----------------------------------------------------------------------------
     8 var BUGNUMBER = 417817;
     9 var summary = 'Do not assert: ASSERT_VALID_PROPERTY_CACHE_HIT';
    10 var actual = '';
    11 var expect = '';
    13 printBugNumber(BUGNUMBER);
    14 printStatus (summary);
    16 const numThreads = 2;
    17 const numPasses = 1000;
    19 var tests = {
    20   0: function first(myAn)
    21   {
    22     /* This print statement is needed to reliably trigger the bug */
    23     print("Hello, World!");
    24   },
    25   length: 1
    26 };
    28 function runAllTests()
    29 {
    30   var passes;
    31   var i;
    33   for (passes = 0; passes < numPasses; passes++)
    34   {
    35     for (i = 0; i < tests.length; i++)
    36     {
    37       tests[0]();
    38     }
    39   }
    40 }
    42 if (typeof scatter == 'undefined')
    43 {
    44   print(expect = actual = 'Test skipped. Requires scatter.');
    45 }
    46 else
    47 {
    48   var i;
    49   var a = [];
    50   for (i = 0; i < numThreads; i++)
    51     a.push(runAllTests);
    52   scatter(a);
    53 }
    55 reportCompare(expect, actual, summary);

mercurial