tor-browser

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

proxy-1.js (265B)


      1 // Basic for-of test with Proxy.
      2 
      3 var s = '';
      4 var arr = ['a', 'b', 'c', 'd'];
      5 var p = new Proxy(arr, {});
      6 
      7 // Test the same proxy twice.
      8 for (var i = 0; i < 2; i++) {
      9    var j = 0;
     10    for (var x of p)
     11        assertEq(x, arr[j++]);
     12    assertEq(j, arr.length);
     13 }