tor-browser

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

nonconstructor.js (622B)


      1 // |reftest| skip-if(!Uint8Array.fromBase64) -- uint8array-base64 is not enabled unconditionally
      2 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-uint8array.frombase64
      6 description: >
      7  Uint8Array.fromBase64 is not a constructor function.
      8 includes: [isConstructor.js]
      9 features: [uint8array-base64, TypedArray, Reflect.construct]
     10 ---*/
     11 
     12 assert(!isConstructor(Uint8Array.fromBase64), "Uint8Array.fromBase64 is not a constructor");
     13 
     14 assert.throws(TypeError, function() {
     15  new Uint8Array.fromBase64('');
     16 });
     17 
     18 reportCompare(0, 0);