From 6b6d3a0044d419b712d42fbdd3c2ae4181a252cc Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Tue, 31 Aug 2010 04:41:42 +0200 Subject: [PATCH] Bug 589611 - [SeaMonkey 2.1, mochitest-browser-chrome] browser_visituri_privatebrowsing.js:64 - TypeError: Cc['@mozilla.org/privatebrowsing;1'] is undefined; (Av1) Skip this test when PB service is not available. r=sdwilsh (a=test only). --- .../tests/browser/browser_visituri_privatebrowsing.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js index 0be062edb15a..79eda7404ce5 100644 --- a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js +++ b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js @@ -9,7 +9,7 @@ Components.utils.import("resource://gre/modules/Services.jsm"); const INITIAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html"; const FINAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/final.html"; -let gTab = gBrowser.selectedTab = gBrowser.addTab(); +let gTab; /** * One-time observer callback. @@ -58,6 +58,13 @@ function waitForClearHistory(aCallback) function test() { + if (!("@mozilla.org/privatebrowsing;1" in Cc)) { + todo(false, "PB service is not available, bail out"); + return; + } + + gTab = gBrowser.selectedTab = gBrowser.addTab(); + waitForExplicitFinish(); Services.prefs.setBoolPref("browser.privatebrowsing.keep_current_session", true);