merge m-c to fx-team

This commit is contained in:
Tim Taubert 2012-02-05 13:33:30 +01:00
commit 80b0937a17
4 changed files with 21 additions and 2 deletions

View File

@ -22,8 +22,8 @@ let gPage = {
gAllPages.register(this);
// Listen for 'unload' to unregister this page.
function unload() gAllPages.unregister(self);
addEventListener("unload", unload, false);
function unload() { gAllPages.unregister(this); }
addEventListener("unload", unload.bind(this), false);
// Check if the new tab feature is enabled.
if (gAllPages.enabled)

View File

@ -20,6 +20,7 @@ _BROWSER_FILES = \
browser_newtab_reset.js \
browser_newtab_tabsync.js \
browser_newtab_unpin.js \
browser_newtab_bug723102.js \
head.js \
$(NULL)

View File

@ -0,0 +1,17 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function runTests() {
// create a new tab page and hide it.
setLinks("0,1,2,3,4,5,6,7,8");
setPinnedLinks("");
yield addNewTabPageTab();
let firstTab = gBrowser.selectedTab;
yield addNewTabPageTab();
gBrowser.removeTab(firstTab);
cw.gToolbar.hide();
ok(cw.gGrid.node.hasAttribute("page-disabled"), "page is disabled");
}

View File

@ -148,6 +148,7 @@ function getXULDocument(aCallback) {
}, false);
doc.body.appendChild(iframe);
registerCleanupFunction(function () { doc.body.removeChild(iframe); });
}
/**