browser/base/content/test/newtab/browser_newtab_bug876313.js

branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
equal deleted inserted replaced
-1:000000000000 0:3fc9aca74acf
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
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");
12
13 yield addNewTabPageTab();
14 checkGrid("0,99p,1,2,3,4,5,6,7");
15
16 // Unpin the second cell's site.
17 yield unpinCell(1);
18 checkGrid("0,1,2,3,4,5,6,7,8");
19
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 }

mercurial