tor-browser

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

testDirectProxyGetOwnPropertyNames6.js (379B)


      1 load(libdir + "asserts.js");
      2 
      3 // Throw a TypeError if the trap skips a non-configurable property
      4 var target = {};
      5 Object.defineProperty(target, 'foo', {
      6    configurable: false
      7 });
      8 
      9 var handler = { ownKeys: () => [] };
     10 for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy])
     11    assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError);