tor-browser

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

uint8clampedarray.js (642B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 13.6.4
      5 description: >
      6    Uint8ClampedArray instances should be able to be traversed using a
      7    `for..of` loop.
      8 features: [TypedArray]
      9 ---*/
     10 
     11 var iterationCount = 0;
     12 var array = new Uint8ClampedArray([3, 2, 4, 1]);
     13 
     14 var first = 3;
     15 var second = 2;
     16 var third = 4;
     17 var fourth = 1;
     18 
     19 for (var x of array) {
     20  assert.sameValue(x, first);
     21 
     22  first = second;
     23  second = third;
     24  third = fourth;
     25  fourth = null;
     26 
     27  iterationCount += 1;
     28 }
     29 
     30 assert.sameValue(iterationCount, 4);
     31 
     32 reportCompare(0, 0);