Bug 774619 - Fix browser_dbg_bfcache.js test by making GCLI force GC; r=past a=ehsan CLOSED TREE
authorJoe Walker <jwalker@mozilla.com>
Mon, 14 Jan 2013 05:37:00 +0200
changeset 127164 09f5bf30cdc0961c73fb1bc327f9df564cb04875
parent 127163 636f7b80515b88042ddc5165f46185aee9d4689c
child 127165 a8d6394508a3b7e6cba2112cd855974a57cea60b
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast, ehsan
bugs774619
milestone20.0a2
Bug 774619 - Fix browser_dbg_bfcache.js test by making GCLI force GC; r=past a=ehsan CLOSED TREE
browser/devtools/commandline/test/head.js
browser/devtools/debugger/test/Makefile.in
--- a/browser/devtools/commandline/test/head.js
+++ b/browser/devtools/commandline/test/head.js
@@ -62,10 +62,15 @@ function addTab(aURL, aCallback)
   return deferred.promise;
 }
 
 registerCleanupFunction(function tearDown() {
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 
-  console = undefined;
+  // Force GC, because it seems that GCLI can outrun the garbage collector
+  // in some situations, which causes test failures in later tests
+  // Bug 774619 is an example.
+  window.QueryInterface(Ci.nsIInterfaceRequestor)
+      .getInterface(Ci.nsIDOMWindowUtils)
+      .garbageCollect();
 });
--- a/browser/devtools/debugger/test/Makefile.in
+++ b/browser/devtools/debugger/test/Makefile.in
@@ -79,32 +79,25 @@ MOCHITEST_BROWSER_TESTS = \
 	browser_dbg_bug727429_watch-expressions-01.js \
 	browser_dbg_bug727429_watch-expressions-02.js \
 	browser_dbg_bug731394_editor-contextmenu.js \
 	browser_dbg_bug786070_hide_nonenums.js \
 	browser_dbg_displayName.js \
 	browser_dbg_iframes.js \
 	browser_dbg_pause-exceptions.js \
 	browser_dbg_multiple-windows.js \
+	browser_dbg_bfcache.js \
 	browser_dbg_breakpoint-new-script.js \
 	browser_dbg_bug737803_editor_actual_location.js \
 	browser_dbg_progress-listener-bug.js \
 	browser_dbg_chrome-debugging.js \
 	$(filter disabled-for-intermittent-failures--bug-753225, browser_dbg_createRemote.js) \
 	head.js \
 	$(NULL)
 
-ifneq ($(OS_ARCH),WINNT)
-MOCHITEST_BROWSER_TESTS += \
-	browser_dbg_bfcache.js \
-	$(NULL)
-else
-$(filter disabled-temporarily--bug-774619, browser_dbg_bfcache.js)
-endif
-
 MOCHITEST_BROWSER_PAGES = \
 	browser_dbg_tab1.html \
 	browser_dbg_tab2.html \
 	browser_dbg_debuggerstatement.html \
 	browser_dbg_stack.html \
 	browser_dbg_script-switching.html \
 	test-script-switching-01.js \
 	test-script-switching-02.js \