michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function runTests() { michael@0: yield setLinks("0,1,2,3,4,5,6,7,8"); michael@0: setPinnedLinks(""); michael@0: michael@0: yield addNewTabPageTab(); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: michael@0: yield simulateExternalDrop(1); michael@0: checkGrid("0,99p,1,2,3,4,5,6,7"); michael@0: michael@0: yield blockCell(1); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: michael@0: yield simulateExternalDrop(1); michael@0: checkGrid("0,99p,1,2,3,4,5,6,7"); michael@0: michael@0: // Simulate a restart and force the next about:newtab michael@0: // instance to read its data from the storage again. michael@0: NewTabUtils.blockedLinks.resetCache(); michael@0: michael@0: // Update all open pages, e.g. preloaded ones. michael@0: NewTabUtils.allPages.update(); michael@0: michael@0: yield addNewTabPageTab(); michael@0: checkGrid("0,99p,1,2,3,4,5,6,7"); michael@0: michael@0: yield blockCell(1); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: }