summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_bug778409.js
blob: 4a905ad0fa50bf87b40515d0925433f0c3a55839 (plain)
1
2
3
4
5
6
7
8
9
10
11
function run_test() {
  var Cu = Components.utils;
  var sb1 = Cu.Sandbox('http://example.com');
  var sb2 = Cu.Sandbox('http://example.org');
  var chromeObj = {foo: 2};
  var sb1obj = Cu.evalInSandbox('new Object()', sb1);
  chromeObj.__proto__ = sb1obj;
  sb2.wrapMe = chromeObj;
  do_check_true(true, "Didn't crash");
  do_check_eq(sb2.wrapMe.__proto__, sb1obj, 'proto set correctly');
}