Enable bug 442629 test. r=bzbarsky

This commit is contained in:
Mike Hommey 2008-07-17 09:26:02 -04:00
parent 832cb53b87
commit 67762d7cff
2 changed files with 10 additions and 5 deletions

View File

@ -68,4 +68,6 @@ LIBS += \
include $(topsrcdir)/config/rules.mk
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
export PERSONAL_MAILCAP=$(shell cd $(srcdir) && pwd)/mailcap
endif

View File

@ -54,6 +54,9 @@ function run_test() {
const ioService = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
const env = Cc["@mozilla.org/process/environment;1"].
getService(Components.interfaces.nsIEnvironment);
const rootPrefBranch = prefSvc.getBranch("");
//**************************************************************************//
@ -384,9 +387,9 @@ function run_test() {
lolType = handlerSvc.getTypeFromExtension("lolcat");
do_check_eq(lolType, "application/lolcat");
// Commented out for now until it can be made unix-only (bug 442629)
//var handlerInfo = mimeSvc.getFromTypeAndExtension("text/plain", null);
//do_check_eq(handlerInfo.preferredAction, Ci.nsIHandlerInfo.useSystemDefault);
//do_check_eq(handlerInfo.defaultDescription, "sed");
if (env.get("PERSONAL_MAILCAP")) {
handlerInfo = mimeSvc.getFromTypeAndExtension("text/plain", null);
do_check_eq(handlerInfo.preferredAction, Ci.nsIHandlerInfo.useSystemDefault);
do_check_eq(handlerInfo.defaultDescription, "sed");
}
}