merge m-c to fx-team
authorTim Taubert <tim.taubert@gmx.de>
Sun, 05 Feb 2012 13:33:30 +0100
changeset 86206 814d0b2dbabad82625b47f630ccd5572e77c6f90
parent 86203 377336a5ad8e341345d432a21bbe6ab2e7290b8e (current diff)
parent 86205 a7ea6d49bc6999189dd4a463d6dcea5773b80162 (diff)
child 86235 6292e55419d1730a2e88a56fd30b2440ce0b393a
child 86299 e31fff76aeff02eefdb1ff479080623fd5504459
push id22003
push usertim.taubert@gmx.de
push dateSun, 05 Feb 2012 12:34:56 +0000
treeherdermozilla-central@814d0b2dbaba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.0a1
first release with
nightly linux32
814d0b2dbaba / 13.0a1 / 20120206031148 / files
nightly linux64
814d0b2dbaba / 13.0a1 / 20120206031148 / files
nightly mac
814d0b2dbaba / 13.0a1 / 20120206031148 / files
nightly win32
814d0b2dbaba / 13.0a1 / 20120206031148 / files
nightly win64
814d0b2dbaba / 13.0a1 / 20120206031148 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge m-c to fx-team
--- a/browser/base/content/newtab/page.js
+++ b/browser/base/content/newtab/page.js
@@ -17,18 +17,18 @@ let gPage = {
   init: function Page_init(aToolbarSelector, aGridSelector) {
     gToolbar.init(aToolbarSelector);
     this._gridSelector = aGridSelector;
 
     // Add ourselves to the list of pages to receive notifications.
     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)
       this._init();
     else
       this._updateAttributes(false);
   },
 
--- a/browser/base/content/test/newtab/Makefile.in
+++ b/browser/base/content/test/newtab/Makefile.in
@@ -15,13 +15,14 @@ include $(topsrcdir)/config/rules.mk
 	browser_newtab_block.js \
 	browser_newtab_disable.js \
 	browser_newtab_drag_drop.js \
 	browser_newtab_drop_preview.js \
 	browser_newtab_private_browsing.js \
 	browser_newtab_reset.js \
 	browser_newtab_tabsync.js \
 	browser_newtab_unpin.js \
+	browser_newtab_bug723102.js \
 	head.js \
 	$(NULL)
 
 libs::	$(_BROWSER_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/newtab/browser_newtab_bug723102.js
@@ -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");
+}
--- a/browser/components/thumbnails/test/head.js
+++ b/browser/components/thumbnails/test/head.js
@@ -143,16 +143,17 @@ function getXULDocument(aCallback) {
   iframe.setAttribute("src", "chrome://global/content/mozilla.xhtml");
 
   iframe.addEventListener("DOMContentLoaded", function onLoad() {
     iframe.removeEventListener("DOMContentLoaded", onLoad, false);
     aCallback(cachedXULDocument = iframe.contentDocument);
   }, false);
 
   doc.body.appendChild(iframe);
+  registerCleanupFunction(function () { doc.body.removeChild(iframe); });
 }
 
 /**
  * Checks the top-left pixel of a given canvas' 2d context for a given color.
  * @param aContext The 2D context of a canvas.
  * @param aRed The red component's intensity.
  * @param aGreen The green component's intensity.
  * @param aBlue The blue component's intensity.