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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/newtab/browser_newtab_bug735987.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +function runTests() {
     1.8 +  yield setLinks("0,1,2,3,4,5,6,7,8");
     1.9 +  setPinnedLinks("");
    1.10 +
    1.11 +  yield addNewTabPageTab();
    1.12 +  checkGrid("0,1,2,3,4,5,6,7,8");
    1.13 +
    1.14 +  yield simulateExternalDrop(1);
    1.15 +  checkGrid("0,99p,1,2,3,4,5,6,7");
    1.16 +
    1.17 +  yield blockCell(1);
    1.18 +  checkGrid("0,1,2,3,4,5,6,7,8");
    1.19 +
    1.20 +  yield simulateExternalDrop(1);
    1.21 +  checkGrid("0,99p,1,2,3,4,5,6,7");
    1.22 +
    1.23 +  // Simulate a restart and force the next about:newtab
    1.24 +  // instance to read its data from the storage again.
    1.25 +  NewTabUtils.blockedLinks.resetCache();
    1.26 +
    1.27 +  // Update all open pages, e.g. preloaded ones.
    1.28 +  NewTabUtils.allPages.update();
    1.29 +
    1.30 +  yield addNewTabPageTab();
    1.31 +  checkGrid("0,99p,1,2,3,4,5,6,7");
    1.32 +
    1.33 +  yield blockCell(1);
    1.34 +  checkGrid("0,1,2,3,4,5,6,7,8");
    1.35 +}

mercurial