Wed, 31 Dec 2014 06:55:46 +0100
Added tag TORBROWSER_REPLICA for changeset 6474c204b198
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 }