Bug 470707 - [SeaMonkey] test_download_history.js fails now, r=dietrich

This commit is contained in:
Marco Bonardo 2008-12-30 22:42:23 +01:00
Родитель 6ea54f586c
Коммит 663e1d48ad
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -50,9 +50,6 @@ var dh = Cc["@mozilla.org/browser/download-history;1"].
getService(Ci.nsIDownloadHistory);
// Test that this nsIDownloadHistory is the one places implements.
do_check_true(dh instanceof Ci.nsINavHistoryService);
var pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);
const NS_LINK_VISITED_EVENT_TOPIC = "link-visited";
const DISABLE_HISTORY_PREF = "browser.history_expire_days";
@ -94,6 +91,15 @@ function test_dh() {
}
function test_dh_privateBrowsing() {
var pb = null;
try {
// PrivateBrowsing component is not always available to Places implementers.
pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);
} catch (ex) {
// Skip this test.
return;
}
prefs.setBoolPref(PB_KEEP_SESSION_PREF, true);
pb.privateBrowsingEnabled = true;