js/src/jit-test/tests/jaeger/bug680842.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.

     2 var gTestcases = new Array;
     3 var gTc = gTestcases;
     4 var msg = '';
     5 function TestCase(n, d, e, a) {
     6   gTestcases[gTc++]=this;
     7 }
     8 TestCase.prototype.dump=function () {
     9   lines = msg
    10   for (var i=0; i<lines; ) {  }
    11 }
    12 function writeHeaderToLog( string ) {
    13   for (var i = 0; ; i++) {
    14     gTestcases[i].dump();
    15   }
    16 }
    17 try {
    18   TIME_2000 = 946684800000
    19 } catch (exc1) {}
    20 addNewTestCase( Date, 999 );
    21 try {
    22   addNewTestCase( Date,TIME_2000 )( writeHeaderToLog( 2000,0,1,0,0,0,0), 0 );
    23 } catch (exc2) {}
    24 function addNewTestCase( DateCase, DateString, ResultArray ) {
    25   new TestCase
    26   Date.prototype=new TestCase
    27 }

mercurial