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 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /*
5 * This test makes sure that the changes made by unpinning
6 * a site are actually written to NewTabUtils' storage.
7 */
8 function runTests() {
9 // Second cell is pinned with page #99.
10 yield setLinks("0,1,2,3,4,5,6,7,8");
11 setPinnedLinks(",99");
13 yield addNewTabPageTab();
14 checkGrid("0,99p,1,2,3,4,5,6,7");
16 // Unpin the second cell's site.
17 yield unpinCell(1);
18 checkGrid("0,1,2,3,4,5,6,7,8");
20 // Clear the pinned cache to force NewTabUtils to read the pref again.
21 NewTabUtils.pinnedLinks.resetCache();
22 NewTabUtils.allPages.update();
23 checkGrid("0,1,2,3,4,5,6,7,8");
24 }