js/xpconnect/tests/chrome/file_expandosharing.jsm

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

mercurial