/modules/libjar/test/unit/test_bug458158.js

http://github.com/zpao/v8monkey · JavaScript · 11 lines · 10 code · 0 blank · 1 comment · 2 complexity · b76feaa60213d91ce1969a408a843099 MD5 · raw file

  1. function run_test() {
  2. var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"]
  3. .createInstance(Components.interfaces.nsIZipReader);
  4. try {
  5. zReader.open(null);
  6. do_throw("Shouldn't get here!");
  7. } catch (e if (e instanceof Components.interfaces.nsIException &&
  8. e.result == Components.results.NS_ERROR_NULL_POINTER)) {
  9. // do nothing, this test passes
  10. }
  11. }