diff --git a/testing/xpcshell/xpcshell.ini b/testing/xpcshell/xpcshell.ini index f98c8069cec..455dd827487 100644 --- a/testing/xpcshell/xpcshell.ini +++ b/testing/xpcshell/xpcshell.ini @@ -99,6 +99,7 @@ skip-if = os == "android" [include:browser/devtools/shared/test/unit/xpcshell.ini] [include:extensions/spellcheck/hunspell/tests/unit/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:services/crypto/component/tests/unit/xpcshell.ini] [include:layout/tools/layout-debug/tests/unit/xpcshell.ini] diff --git a/toolkit/components/osfile/tests/Makefile.in b/toolkit/components/osfile/tests/Makefile.in index 58398dfcbf3..dc20c5cf96a 100644 --- a/toolkit/components/osfile/tests/Makefile.in +++ b/toolkit/components/osfile/tests/Makefile.in @@ -11,5 +11,7 @@ relativesrcdir = @relativesrcdir@ MODULE = test_osfile DIRS = mochi +XPCSHELL_TESTS = xpcshell + include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js new file mode 100644 index 00000000000..0f86b2ea8bc --- /dev/null +++ b/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js @@ -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 + ); +} diff --git a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini new file mode 100644 index 00000000000..9346009bdf4 --- /dev/null +++ b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini @@ -0,0 +1,5 @@ +[DEFAULT] +head = +tail = + +[test_osfile_async.js]