js/src/tests/js1_5/extensions/regress-342960.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-if(!xulRuntime.shell&&(Android||xulRuntime.OS=="WINNT"||xulRuntime.OS=="Linux")) silentfail slow -- bug 528464
     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 = 342960;
     9 var summary = 'Do not crash on large string toSource';
    10 var actual = 'No Crash';
    11 var expect = 'No Crash';
    14 //-----------------------------------------------------------------------------
    15 test();
    16 //-----------------------------------------------------------------------------
    18 function test()
    19 {
    20   enterFunc ('test');
    21   printBugNumber(BUGNUMBER);
    22   printStatus (summary);
    24   expectExitCode(0);
    25   expectExitCode(5);
    27   function v()
    28   {
    29     var meg="";
    30     var r="";
    31     var i;
    32     print("don't interrupt the script. let it go.");
    33     for(i=0;i<1024*1024;i++) meg += "v";
    34     for(i=0;i<1024/8;i++) r += meg;
    35     var o={f1: r, f2: r, f3: r,f4: r,f5: r, f6: r, f7: r, f8: r,f9: r};
    36     print('done obj');
    37     var rr=r.toSource();
    38     print('done toSource()');
    39   }
    41   v();
    43   reportCompare(expect, actual, summary);
    45   exitFunc ('test');
    46 }

mercurial