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 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 * Contributor:
5 * Jeff Walden <jwalden+code@mit.edu>
6 */
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 562446;
10 var summary = 'ES5: Array.prototype.toLocaleString';
12 print(BUGNUMBER + ": " + summary);
14 /**************
15 * BEGIN TEST *
16 **************/
18 var o;
20 o = { length: 2, 0: 7, 1: { toLocaleString: function() { return "baz" } } };
21 assertEq(Array.prototype.toLocaleString.call(o), "7,baz");
23 o = {};
24 assertEq(Array.prototype.toLocaleString.call(o), "");
26 var log = '';
27 arr = {length: {valueOf: function () { log += "L"; return 2; }},
28 0: "x", 1: "z"};
29 assertEq(Array.prototype.toLocaleString.call(arr), "x,z");
30 assertEq(log, "L");
32 /******************************************************************************/
34 reportCompare(true, true);
36 print("All tests passed!");