js/src/tests/ecma_3/RegExp/regress-220367-001.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  *
     8  * Date:    26 September 2003
     9  * SUMMARY: Regexp conformance test
    10  *
    11  * See http://bugzilla.mozilla.org/show_bug.cgi?id=220367
    12  *
    13  */
    14 //-----------------------------------------------------------------------------
    15 var i = 0;
    16 var BUGNUMBER = 220367;
    17 var summary = 'Regexp conformance test';
    18 var status = '';
    19 var statusmessages = new Array();
    20 var pattern = '';
    21 var patterns = new Array();
    22 var string = '';
    23 var strings = new Array();
    24 var actualmatch = '';
    25 var actualmatches = new Array();
    26 var expectedmatch = '';
    27 var expectedmatches = new Array();
    30 status = inSection(1);
    31 string = 'a';
    32 pattern = /(a)|(b)/;
    33 actualmatch = string.match(pattern);
    34 expectedmatch = Array(string, 'a', undefined);
    35 addThis();
    37 status = inSection(2);
    38 string = 'b';
    39 pattern = /(a)|(b)/;
    40 actualmatch = string.match(pattern);
    41 expectedmatch = Array(string, undefined, 'b');
    42 addThis();
    46 //-----------------------------------------------------------------------------
    47 test();
    48 //-----------------------------------------------------------------------------
    52 function addThis()
    53 {
    54   statusmessages[i] = status;
    55   patterns[i] = pattern;
    56   strings[i] = string;
    57   actualmatches[i] = actualmatch;
    58   expectedmatches[i] = expectedmatch;
    59   i++;
    60 }
    63 function test()
    64 {
    65   enterFunc ('test');
    66   printBugNumber(BUGNUMBER);
    67   printStatus (summary);
    68   testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);
    69   exitFunc ('test');
    70 }

mercurial