Bug 808428 - Testing that OS.File can be called from xpcshell. r=nfroyd

--HG--
extra : rebase_source : 6dfc9107c4ff2453b47a3df528ca8d0037b91cf8
This commit is contained in:
David Rajchenbach-Teller 2012-11-05 07:59:00 -08:00
parent 6a3d40f2ec
commit 626301fbda
4 changed files with 24 additions and 0 deletions

View File

@ -99,6 +99,7 @@ skip-if = os == "android"
[include:browser/devtools/shared/test/unit/xpcshell.ini] [include:browser/devtools/shared/test/unit/xpcshell.ini]
[include:extensions/spellcheck/hunspell/tests/unit/xpcshell.ini] [include:extensions/spellcheck/hunspell/tests/unit/xpcshell.ini]
[include:toolkit/components/search/tests/xpcshell/xpcshell.ini] [include:toolkit/components/search/tests/xpcshell/xpcshell.ini]
[include:toolkit/components/osfile/tests/xpcshell/xpcshell.ini]
[include:toolkit/mozapps/shared/test/unit/xpcshell.ini] [include:toolkit/mozapps/shared/test/unit/xpcshell.ini]
[include:services/crypto/component/tests/unit/xpcshell.ini] [include:services/crypto/component/tests/unit/xpcshell.ini]
[include:layout/tools/layout-debug/tests/unit/xpcshell.ini] [include:layout/tools/layout-debug/tests/unit/xpcshell.ini]

View File

@ -11,5 +11,7 @@ relativesrcdir = @relativesrcdir@
MODULE = test_osfile MODULE = test_osfile
DIRS = mochi DIRS = mochi
XPCSHELL_TESTS = xpcshell
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,16 @@
"use strict";
Components.utils.import("resource://gre/modules/osfile.jsm");
/**
* A trivial test ensuring that we can call osfile from xpcshell.
* (see bug 808161)
*/
function run_test() {
do_test_pending();
OS.File.getCurrentDirectory().then(
do_test_finished,
do_test_finished
);
}

View File

@ -0,0 +1,5 @@
[DEFAULT]
head =
tail =
[test_osfile_async.js]