browser/base/content/test/newtab/browser_newtab_reset.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_reset.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/*
     1.8 + * These tests make sure that resetting the 'New Tage Page' works as expected.
     1.9 + */
    1.10 +function runTests() {
    1.11 +  // Disabled until bug 716543 is fixed.
    1.12 +  return;
    1.13 +
    1.14 +  // create a new tab page and check its modified state after blocking a site
    1.15 +  yield setLinks("0,1,2,3,4,5,6,7,8");
    1.16 +  setPinnedLinks("");
    1.17 +
    1.18 +  yield addNewTabPageTab();
    1.19 +  let resetButton = getContentDocument().getElementById("toolbar-button-reset");
    1.20 +
    1.21 +  checkGrid("0,1,2,3,4,5,6,7,8");
    1.22 +  ok(!resetButton.hasAttribute("modified"), "page is not modified");
    1.23 +
    1.24 +  yield blockCell(4);
    1.25 +  checkGrid("0,1,2,3,5,6,7,8,");
    1.26 +  ok(resetButton.hasAttribute("modified"), "page is modified");
    1.27 +
    1.28 +  yield getContentWindow().gToolbar.reset(TestRunner.next);
    1.29 +  checkGrid("0,1,2,3,4,5,6,7,8");
    1.30 +  ok(!resetButton.hasAttribute("modified"), "page is not modified");
    1.31 +}

mercurial