js/src/jit-test/tests/basic/string-regexp-capture-groups.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 "abcdefg".match(/(x)y(z)/g);
     2 assertEq(RegExp.$1, "");
     4 assertEq("abcdef".match(/a(b)cd/g)[0], "abcd");
     5 assertEq(RegExp.$1, "b");
     6 assertEq(RegExp.$2, "");
     8 "abcdef".match(/(a)b(c)/g);
     9 assertEq(RegExp.$1, "a");
    10 assertEq(RegExp.$2, "c");
    11 assertEq(RegExp.$3, "");
    13 "abcabdabe".match(/(a)b(.)/g);
    14 assertEq(RegExp.$1, "a");
    15 assertEq(RegExp.$2, "e");
    17 "abcdefg".match(/(x)y(z)/g);
    18 assertEq(RegExp.$1, "a");    //If there's no match, we don't update the statics.
    20 "abcdefg".match(/(g)/g);
    21 assertEq(RegExp.$1, "g");

mercurial