js/src/tests/js1_5/Regress/regress-76054.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: 16 May 2001
     8  *
     9  * SUMMARY: Regression test for bug 76054
    10  *
    11  * See http://bugzilla.mozilla.org/show_bug.cgi?id=76054
    12  * See http://bugzilla.mozilla.org/show_bug.cgi?id=78706
    13  * All String HTML methods should be LOWER case -
    14  */
    15 //-----------------------------------------------------------------------------
    16 var UBound = 0;
    17 var BUGNUMBER = 76054;
    18 var summary = 'Testing that String HTML methods produce all lower-case';
    19 var statprefix = 'Currently testing String.';
    20 var status = '';
    21 var statusitems = [ ];
    22 var actual = '';
    23 var actualvalues = [ ];
    24 var expect= '';
    25 var expectedvalues = [ ];
    26 var s = 'xyz';
    28 status = 'anchor()';
    29 actual = s.anchor();
    30 expect = actual.toLowerCase();
    31 addThis();
    33 status = 'big()';
    34 actual = s.big();
    35 expect = actual.toLowerCase();
    36 addThis();
    38 status = 'blink()';
    39 actual = s.blink();
    40 expect = actual.toLowerCase();
    41 addThis();
    43 status = 'bold()';
    44 actual = s.bold();
    45 expect = actual.toLowerCase();
    46 addThis();
    48 status = 'italics()';
    49 actual = s.italics();
    50 expect = actual.toLowerCase();
    51 addThis();
    53 status = 'fixed()';
    54 actual = s.fixed();
    55 expect = actual.toLowerCase();
    56 addThis();
    58 status = 'fontcolor()';
    59 actual = s.fontcolor();
    60 expect = actual.toLowerCase();
    61 addThis();
    63 status = 'fontsize()';
    64 actual = s.fontsize();
    65 expect = actual.toLowerCase();
    66 addThis();
    68 status = 'link()';
    69 actual = s.link();
    70 expect = actual.toLowerCase();
    71 addThis();
    73 status = 'small()';
    74 actual = s.small();
    75 expect = actual.toLowerCase();
    76 addThis();
    78 status = 'strike()';
    79 actual = s.strike();
    80 expect = actual.toLowerCase();
    81 addThis();
    83 status = 'sub()';
    84 actual = s.sub();
    85 expect = actual.toLowerCase();
    86 addThis();
    88 status = 'sup()';
    89 actual = s.sup();
    90 expect = actual.toLowerCase();
    91 addThis();
    94 //-------------------------------------------------------------------------------------------------
    95 test();
    96 //-------------------------------------------------------------------------------------------------
    99 function addThis()
   100 {
   101   statusitems[UBound] = status;
   102   actualvalues[UBound] = actual;
   103   expectedvalues[UBound] = expect;
   104   UBound++;
   105 }
   108 function test()
   109 {
   110   enterFunc ('test');
   111   printBugNumber(BUGNUMBER);
   112   printStatus (summary);
   114   for (var i = 0; i < UBound; i++)
   115   {
   116     reportCompare(expectedvalues[i], actualvalues[i], getStatus(i));
   117   }
   119   exitFunc ('test');
   120 }
   123 function getStatus(i)
   124 {
   125   return statprefix + statusitems[i];
   126 }

mercurial