gecko/js/xpconnect/tests/unit/test_bug851895.js
2013-03-21 08:20:46 -07:00

12 lines
408 B
JavaScript

const Cu = Components.utils;
function run_test() {
// Make sure Components.utils gets its |this| fixed up.
var isXrayWrapper = Components.utils.isXrayWrapper;
do_check_true(!isXrayWrapper({}), "Didn't throw");
// Even for classes without |this| fixup, make sure that we don't crash.
var isSuccessCode = Components.isSuccessCode;
try { isSuccessCode(Components.results.NS_OK); } catch (e) {};
}