From 61c5befc7318a6d5ff8d5b0c38e02e12a519f974 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 18 Sep 2010 13:28:50 +0200 Subject: [PATCH] Bug 596592 - Leaving Private Browsing mode resurrects a window that was closed at the time of entering PB. r=ehsan a=test --- .../test/browser/browser_privatebrowsing_popupmode.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupmode.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupmode.js index 9bb35e3d8d33..a75763389b16 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupmode.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupmode.js @@ -45,6 +45,12 @@ function test() { let ss = Cc["@mozilla.org/browser/sessionstore;1"]. getService(Ci.nsISessionStore); + // clear the history of closed windows (that other tests have created) + // to avoid the issue in bug 596592 + // XXX remove this when bug 597071 is fixed + while (ss.getClosedWindowCount()) + ss.forgetClosedWindow(0); + // backup our state let stateBackup = ss.getWindowState(window);