From 452bac2b8b92d4673ab368e641a3deceee4ec3f7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 4 Dec 2008 15:51:25 -0500 Subject: [PATCH] Add a workaround for bfcache suckage and reenable these tests. r=sheriff for CLOSED TREE --- docshell/test/chrome/Makefile.in | 17 +++++++---------- docshell/test/chrome/bug112564_window.xul | 6 +++++- docshell/test/chrome/bug215405_window.xul | 4 ++++ docshell/test/chrome/bug92598_window.xul | 4 ++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/docshell/test/chrome/Makefile.in b/docshell/test/chrome/Makefile.in index bd54a3b5f6b..7b74d27ad3c 100644 --- a/docshell/test/chrome/Makefile.in +++ b/docshell/test/chrome/Makefile.in @@ -55,8 +55,15 @@ _HTTP_FILES = \ $(NULL) _TEST_FILES = \ + test_bug92598.xul \ + bug92598_window.xul \ + 92598_nostore.html \ + test_bug112564.xul \ + bug112564_window.xul \ test_bug113934.xul \ bug113934_window.xul \ + test_bug215405.xul \ + bug215405_window.xul \ test_bug364461.xul \ bug364461_window.xul \ test_bug396519.xul \ @@ -67,16 +74,6 @@ _TEST_FILES = \ test_bug456980.xul \ $(NULL) -# Disabled for now -# test_bug92598.xul \ -# bug92598_window.xul \ -# 92598_nostore.html \ -# test_bug112564.xul \ -# bug112564_window.xul \ -# test_bug215405.xul \ -# bug215405_window.xul \ - - libs:: $(_HTTP_FILES) $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir) diff --git a/docshell/test/chrome/bug112564_window.xul b/docshell/test/chrome/bug112564_window.xul index 053805ad451..a430d1af542 100644 --- a/docshell/test/chrome/bug112564_window.xul +++ b/docshell/test/chrome/bug112564_window.xul @@ -64,7 +64,11 @@ for each (let eventType in LISTEN_EVENTS) { gBrowser.removeEventListener(eventType, eventListener, true); } - + + // Work around bug 467960 + var history = gBrowser.webNavigation.sessionHistory; + history.PurgeHistory(history.count); + window.close(); window.opener.wrappedJSObject.SimpleTest.finish(); } diff --git a/docshell/test/chrome/bug215405_window.xul b/docshell/test/chrome/bug215405_window.xul index ddde3d1c70a..6a05fdc494a 100644 --- a/docshell/test/chrome/bug215405_window.xul +++ b/docshell/test/chrome/bug215405_window.xul @@ -64,6 +64,10 @@ function finish() { gBrowser.removeEventListener("pageshow", eventListener, true); + // Work around bug 467960 + var history = gBrowser.webNavigation.sessionHistory; + history.PurgeHistory(history.count); + window.close(); window.opener.wrappedJSObject.SimpleTest.finish(); } diff --git a/docshell/test/chrome/bug92598_window.xul b/docshell/test/chrome/bug92598_window.xul index 5e6dff4c0fa..6d76a1e78b4 100644 --- a/docshell/test/chrome/bug92598_window.xul +++ b/docshell/test/chrome/bug92598_window.xul @@ -65,6 +65,10 @@ gBrowser.removeEventListener(eventType, eventListener, true); } + // Work around bug 467960 + var history = gBrowser.webNavigation.sessionHistory; + history.PurgeHistory(history.count); + window.close(); window.opener.wrappedJSObject.SimpleTest.finish(); }