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

branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
equal deleted inserted replaced
-1:000000000000 0:6a76c0d984df
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 /*
5 * These tests make sure that resetting the 'New Tage Page' works as expected.
6 */
7 function runTests() {
8 // Disabled until bug 716543 is fixed.
9 return;
10
11 // create a new tab page and check its modified state after blocking a site
12 yield setLinks("0,1,2,3,4,5,6,7,8");
13 setPinnedLinks("");
14
15 yield addNewTabPageTab();
16 let resetButton = getContentDocument().getElementById("toolbar-button-reset");
17
18 checkGrid("0,1,2,3,4,5,6,7,8");
19 ok(!resetButton.hasAttribute("modified"), "page is not modified");
20
21 yield blockCell(4);
22 checkGrid("0,1,2,3,5,6,7,8,");
23 ok(resetButton.hasAttribute("modified"), "page is modified");
24
25 yield getContentWindow().gToolbar.reset(TestRunner.next);
26 checkGrid("0,1,2,3,4,5,6,7,8");
27 ok(!resetButton.hasAttribute("modified"), "page is not modified");
28 }

mercurial