From c9758772106b0a1ed3523c65f3851ed17830b40f Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Thu, 17 Jul 2008 15:04:27 +0100 Subject: [PATCH] Bug 431130 xpcshell test test_nsIDownloadHistory.js fails on Thunderbird. r=sdwilsh --- docshell/test/unit/test_nsIDownloadHistory.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docshell/test/unit/test_nsIDownloadHistory.js b/docshell/test/unit/test_nsIDownloadHistory.js index 76d6143465c..b578c012f0f 100644 --- a/docshell/test/unit/test_nsIDownloadHistory.js +++ b/docshell/test/unit/test_nsIDownloadHistory.js @@ -74,6 +74,16 @@ var tests = [testLinkVistedObserver]; function run_test() { + // Not everyone uses/defines an nsGlobalHistory* service. Especially if + // MOZ_PLACES is not defined. If getService fails, then abort gracefully. + try { + Cc["@mozilla.org/browser/global-history;2"]. + getService(Ci.nsIGlobalHistory2); + } + catch (ex) { + return; + } + for (var i = 0; i < tests.length; i++) tests[i]();