tor-browser

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

testDirectProxySetArray2.js (395B)


      1 // Direct proxies pass through the receiver argument to [[Set]] to their targets.
      2 // This also tests that an ordinary object's [[Set]] method can change the length
      3 // of an array passed as the receiver.
      4 
      5 load(libdir + "asserts.js");
      6 
      7 var a = [0, 1, 2, 3];
      8 var p = new Proxy({}, {});
      9 Reflect.set(p, "length", 2, a);
     10 assertEq("length" in p, false);
     11 assertEq(a.length, 2);
     12 assertDeepEq(a, [0, 1]);