diff options
Diffstat (limited to 'testing/xpcshell/example/unit/test_check_nsIException.js')
-rw-r--r-- | testing/xpcshell/example/unit/test_check_nsIException.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/xpcshell/example/unit/test_check_nsIException.js b/testing/xpcshell/example/unit/test_check_nsIException.js new file mode 100644 index 000000000..115542fca --- /dev/null +++ b/testing/xpcshell/example/unit/test_check_nsIException.js @@ -0,0 +1,11 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +function run_test() { + let env = Components.classes["@mozilla.org/process/environment;1"] + .getService(Components.interfaces.nsIEnvironment); + do_check_throws_nsIException(function () { + env.QueryInterface(Components.interfaces.nsIFile); + }, "NS_NOINTERFACE"); +} + |