tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

testDirectProxyKeys1.js (577B)


      1 // Forward to the target if the trap is not defined
      2 var proto = Object.create(null, {
      3    a: {
      4        enumerable: true,
      5        configurable: true
      6    },
      7    b: {
      8        enumerable: false,
      9        configurable: true
     10    }
     11 });
     12 var target = Object.create(proto, {
     13    c: {
     14        enumerable: true,
     15        configurable: true
     16    },
     17    d: {
     18        enumerable: false,
     19        configurable: true
     20    }
     21 });
     22 
     23 for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) {
     24    var names = Object.keys(p);
     25    assertEq(names.length, 1);
     26    assertEq(names[0], 'c');
     27 }