Bug 802718 - Ensure internal widget state is restored after browser_minimize.js, to work around Unity bug on Ubuntu. r=gavin DONTBUILD
authorGraeme McCutcheon <graememcc_firefox@graeme-online.co.uk>
Thu, 18 Oct 2012 12:23:30 +0100
changeset 110786 455b30bb6e18a7f2663bc6c0d0e4de8573014bc0
parent 110785 c2e53249351da4ee98c6340105094cc18bec3b63
child 110787 6511fd29e7d841f661d9da3a74837f0e2f0244a1
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersgavin
bugs802718
milestone19.0a1
Bug 802718 - Ensure internal widget state is restored after browser_minimize.js, to work around Unity bug on Ubuntu. r=gavin DONTBUILD
browser/base/content/test/browser_minimize.js
--- a/browser/base/content/test/browser_minimize.js
+++ b/browser/base/content/test/browser_minimize.js
@@ -15,16 +15,20 @@ function waitForInactive() {
         return;
     }
     is(gBrowser.docShell.isActive, false, "Docshell should be inactive");
     window.restore();
     waitForActive();
 }
 
 function test() {
+    registerCleanupFunction(function() {
+      window.restore();
+    });
+
     waitForExplicitFinish();
     is(gBrowser.docShell.isActive, true, "Docshell should be active");
     window.minimize();
     // XXX On Linux minimize/restore seem to be very very async, but
     // our window.windowState changes sync.... so we can't rely on the
     // latter correctly reflecting the state of the former.  In
     // particular, a restore() call before minimizing is done will not
     // actually restore the window, but change the window state.  As a