toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:9c80c8934a8b
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 */
5
6 var installLocation = gProfD.clone();
7 installLocation.append("baddir");
8 installLocation.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664);
9
10 var dirProvider2 = {
11 getFile: function(prop, persistent) {
12 persistent.value = true;
13 if (prop == "XREUSysExt")
14 return installLocation.clone();
15 return null;
16 },
17 QueryInterface: function(iid) {
18 if (iid.equals(Components.interfaces.nsIDirectoryServiceProvider) ||
19 iid.equals(Components.interfaces.nsISupports)) {
20 return this;
21 }
22 throw Components.results.NS_ERROR_NO_INTERFACE;
23 }
24 };
25 Services.dirsvc.QueryInterface(Components.interfaces.nsIDirectoryService)
26 .registerProvider(dirProvider2);
27
28 function run_test()
29 {
30 var log = gProfD.clone();
31 log.append("extensions.log");
32 do_check_false(log.exists());
33
34 // Setup for test
35 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
36
37 startupManager();
38 do_check_false(log.exists());
39 }

mercurial