Bug 975552 - Let the leak detector know about the preloaded customization tab r=bustage
authorTim Taubert <ttaubert@mozilla.com>
Fri, 28 Feb 2014 20:55:37 +0100
changeset 171781 2933b8f7e9f2fbbdde6f95a15c6f9d7982f70e24
parent 171780 1de38e0fbbb68ab09504b398e99b2730a2aa8af7
child 171782 96e8a0819361d6727daea3e0d38338a5f6483003
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersbustage
bugs975552
milestone30.0a1
Bug 975552 - Let the leak detector know about the preloaded customization tab r=bustage
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -12,16 +12,19 @@ if (Cc === undefined) {
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "BrowserNewTabPreloader",
   "resource:///modules/BrowserNewTabPreloader.jsm", "BrowserNewTabPreloader");
 
+XPCOMUtils.defineLazyModuleGetter(this, "CustomizationTabPreloader",
+  "resource:///modules/CustomizationTabPreloader.jsm", "CustomizationTabPreloader");
+
 window.addEventListener("load", testOnLoad, false);
 
 function testOnLoad() {
   window.removeEventListener("load", testOnLoad, false);
 
   gConfig = readConfig();
   if (gConfig.testRoot == "browser" ||
       gConfig.testRoot == "metro" ||
@@ -421,16 +424,17 @@ Tester.prototype = {
           socialSidebar.setAttribute("src", "about:blank");
 
           // Destroy BackgroundPageThumbs resources.
           let {BackgroundPageThumbs} =
             Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm", {});
           BackgroundPageThumbs._destroy();
 
           BrowserNewTabPreloader.uninit();
+          CustomizationTabPreloader.uninit();
           SocialFlyout.unload();
           SocialShare.uninit();
           TabView.uninit();
         }
 
         // Schedule GC and CC runs before finishing in order to detect
         // DOM windows leaked by our tests or the tested code. Note that we
         // use a shrinking GC so that the JS engine will discard JIT code and