Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 load(libdir + "eqArrayHelper.js");
3 function f1(a, bIs, b=3, ...rest) {
4 assertEq(a, 1);
5 assertEq(bIs, b);
6 assertEqArray(rest, []);
7 }
8 assertEq(f1.length, 2);
9 f1(1, 3);
10 f1(1, 42, 42);
11 function f2(a=rest, ...rest) {
12 assertEq(a, undefined);
13 }
14 f2();
15 function f3(a=rest, ...rest) {
16 assertEq(a, 1);
17 assertEqArray(rest, [2, 3, 4]);
18 }
19 f3(1, 2, 3, 4);
20 function f4(a=42, ...f) {
21 assertEq(typeof f, "function");
22 function f() {}
23 }
24 f4()