diff -r 000000000000 -r 6474c204b198 js/xpconnect/tests/chrome/file_expandosharing.jsm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/xpconnect/tests/chrome/file_expandosharing.jsm Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,10 @@ +this.EXPORTED_SYMBOLS = ['checkFromJSM']; + +this.checkFromJSM = function checkFromJSM(target, is_op) { + is_op(target.numProp, 42, "Number expando works"); + is_op(target.strProp, "foo", "String expando works"); + // If is_op is todo_is, target.objProp will be undefined. + try { + is_op(target.objProp.bar, "baz", "Object expando works"); + } catch(e) { is_op(0, 1, "No object expando"); } +}