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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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  */
     6 var installLocation = gProfD.clone();
     7 installLocation.append("baddir");
     8 installLocation.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664);
    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);
    28 function run_test()
    29 {
    30   var log = gProfD.clone();
    31   log.append("extensions.log");
    32   do_check_false(log.exists());
    34   // Setup for test
    35   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
    37   startupManager();
    38   do_check_false(log.exists());
    39 }

mercurial