michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /* michael@0: * This test makes sure that the changes made by unpinning michael@0: * a site are actually written to NewTabUtils' storage. michael@0: */ michael@0: function runTests() { michael@0: // Second cell is pinned with page #99. michael@0: yield setLinks("0,1,2,3,4,5,6,7,8"); michael@0: setPinnedLinks(",99"); michael@0: michael@0: yield addNewTabPageTab(); michael@0: checkGrid("0,99p,1,2,3,4,5,6,7"); michael@0: michael@0: // Unpin the second cell's site. michael@0: yield unpinCell(1); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: michael@0: // Clear the pinned cache to force NewTabUtils to read the pref again. michael@0: NewTabUtils.pinnedLinks.resetCache(); michael@0: NewTabUtils.allPages.update(); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: }