Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 }