Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: js/xpconnect/tests/unit/xpcshell.toml
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
function test_BrokenFile(path, shouldThrow, expectedName) {
var didThrow = false;
try {
ChromeUtils.import(path);
} catch (ex) {
var exceptionName = ex.name;
print("ex: " + ex + "; name = " + ex.name);
didThrow = true;
}
Assert.equal(didThrow, shouldThrow);
if (didThrow)
Assert.equal(exceptionName, expectedName);
}
function run_test() {
true,
"NS_ERROR_FILE_NOT_FOUND");
true,
"NS_ERROR_FILE_NOT_FOUND");
}