Sat, 03 Jan 2015 20:18:00 +0100
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(Android)
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 /*
5 * Any copyright is dedicated to the Public Domain.
6 * http://creativecommons.org/licenses/publicdomain/
7 */
9 /* In strict mode, a 'let' block may not bind 'eval' or 'arguments'. */
10 assertEq(testLenientAndStrict('let (eval=1) {}',
11 parsesSuccessfully,
12 parseRaisesException(SyntaxError)),
13 true);
14 assertEq(testLenientAndStrict('let ([eval]=1) {}',
15 parsesSuccessfully,
16 parseRaisesException(SyntaxError)),
17 true);
18 assertEq(testLenientAndStrict('let ({x:eval}=1) {}',
19 parsesSuccessfully,
20 parseRaisesException(SyntaxError)),
21 true);
22 assertEq(testLenientAndStrict('let (arguments=1) {}',
23 parsesSuccessfully,
24 parseRaisesException(SyntaxError)),
25 true);
26 assertEq(testLenientAndStrict('let ([arguments]=1) {}',
27 parsesSuccessfully,
28 parseRaisesException(SyntaxError)),
29 true);
30 assertEq(testLenientAndStrict('let ({x:arguments}=1) {}',
31 parsesSuccessfully,
32 parseRaisesException(SyntaxError)),
33 true);
35 reportCompare(true, true);