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 actual = '';
2 expected = '3,6,9,12,15,18,';
4 function slice(a, b)
5 {
6 //return { x: a + ':' + b };
7 return b;
8 }
10 function f(index)
11 {
12 var length = 20;
14 function get3() {
15 //appendToActual("get3 " + index);
16 if (length - index < 3)
17 return null;
18 return slice(index, index += 3);
19 }
21 var bytes = null;
22 while (bytes = get3()) {
23 appendToActual(bytes);
24 }
25 }
27 f(0);
30 assertEq(actual, expected)