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 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Both unicode and ascii chars are allowed
6 *
7 * @path ch08/8.4/S8.4_A10.js
8 * @description Create string using both unicode and ascii chars
9 */
11 //////////////////////////////////////////////////////////////////////////////
12 //CHECK#1
13 var __str = "\u0041A\u0042B\u0043C";
14 if (__str !== 'AABBCC'){
15 $ERROR('#1: var __str = "\\u0041A\\u0042B\\u0043C"; __str === \'AABBCC\'. Actual: ' + (__str));
16 };
17 //
18 //////////////////////////////////////////////////////////////////////////////
20 //////////////////////////////////////////////////////////////////////////////
21 //CHECK#2
22 var __str__ = "\u0041\u0042\u0043"+'ABC';
23 if (__str__ !== 'ABCABC'){
24 $ERROR('#2: var __str__ = "\\u0041\\u0042\\u0043"+\'ABC\'; __str__ === \'ABCABC\'. Actual: ' + (__str__));
25 };
26 //
27 //////////////////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////////////////
30 //CHECK#3
31 var str__ = "ABC"+'\u0041\u0042\u0043';
32 if (str__ !== "ABCABC"){
33 $ERROR('#2: var str__ = "ABC"+\'\\u0041\\u0042\\u0043\'; str__ === "ABCABC". Actual: ' + (str__));
34 };
35 //
36 //////////////////////////////////////////////////////////////////////////////