From e893f27ae0eb6047618a7567127b4ce40bf8a4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Sat, 28 Nov 2009 09:58:11 +0100 Subject: [PATCH] browser_490040.js cleanup --- .../components/sessionstore/test/browser/browser_490040.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/components/sessionstore/test/browser/browser_490040.js b/browser/components/sessionstore/test/browser/browser_490040.js index 9728a7ffc57..7ee5cd6c5a2 100644 --- a/browser/components/sessionstore/test/browser/browser_490040.js +++ b/browser/components/sessionstore/test/browser/browser_490040.js @@ -66,12 +66,16 @@ function test() { gPrefService.setIntPref("browser.sessionstore.max_windows_undo", curClosedWindowCount + 1); + var origWin; let windowObserver = { observe: function(aSubject, aTopic, aData) { let theWin = aSubject.QueryInterface(Ci.nsIDOMWindow); + if (origWin && theWin != origWin) + return; - switch(aTopic) { + switch (aTopic) { case "domwindowopened": + origWin = theWin; theWin.addEventListener("load", function () { theWin.removeEventListener("load", arguments.callee, false); executeSoon(function() {