michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: var installLocation = gProfD.clone(); michael@0: installLocation.append("baddir"); michael@0: installLocation.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664); michael@0: michael@0: var dirProvider2 = { michael@0: getFile: function(prop, persistent) { michael@0: persistent.value = true; michael@0: if (prop == "XREUSysExt") michael@0: return installLocation.clone(); michael@0: return null; michael@0: }, michael@0: QueryInterface: function(iid) { michael@0: if (iid.equals(Components.interfaces.nsIDirectoryServiceProvider) || michael@0: iid.equals(Components.interfaces.nsISupports)) { michael@0: return this; michael@0: } michael@0: throw Components.results.NS_ERROR_NO_INTERFACE; michael@0: } michael@0: }; michael@0: Services.dirsvc.QueryInterface(Components.interfaces.nsIDirectoryService) michael@0: .registerProvider(dirProvider2); michael@0: michael@0: function run_test() michael@0: { michael@0: var log = gProfD.clone(); michael@0: log.append("extensions.log"); michael@0: do_check_false(log.exists()); michael@0: michael@0: // Setup for test michael@0: createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1"); michael@0: michael@0: startupManager(); michael@0: do_check_false(log.exists()); michael@0: }