diff options
Diffstat (limited to 'toolkit/components/osfile/tests/xpcshell/test_loader.js')
-rw-r--r-- | toolkit/components/osfile/tests/xpcshell/test_loader.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/toolkit/components/osfile/tests/xpcshell/test_loader.js b/toolkit/components/osfile/tests/xpcshell/test_loader.js deleted file mode 100644 index dcfa819be..000000000 --- a/toolkit/components/osfile/tests/xpcshell/test_loader.js +++ /dev/null @@ -1,37 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -/** - * Test that OS.File can be loaded using the CommonJS loader. - */ - -var { Loader } = Components.utils.import('resource://gre/modules/commonjs/toolkit/loader.js', {}); - -function run_test() { - run_next_test(); -} - - -add_task(function*() { - let dataDir = Services.io.newFileURI(do_get_file("test_loader/", true)).spec + "/"; - let loader = Loader.Loader({ - paths: {'': dataDir } - }); - - let require = Loader.Require(loader, Loader.Module('module_test_loader', 'foo')); - do_print("Require is ready"); - try { - require('module_test_loader'); - } catch (error) { - dump('Bootstrap error: ' + - (error.message ? error.message : String(error)) + '\n' + - (error.stack || error.fileName + ': ' + error.lineNumber) + '\n'); - - throw error; - } - - do_print("Require has worked"); -}); - |