1 // |reftest| shell-option(--enable-uint8array-base64) skip-if(!Uint8Array.fromBase64||!xulRuntime.shell) -- uint8array-base64 is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-uint8array.frombase64
6 description: Uint8Array.fromBase64 ignores ASCII whitespace in the input
7 includes: [compareArray.js]
8 features: [uint8array-base64, TypedArray]
11 var whitespaceKinds = [
18 whitespaceKinds.forEach(function(pair) {
19 var arr = Uint8Array.fromBase64(pair[0]);
20 assert.sameValue(arr.length, 1);
21 assert.sameValue(arr.buffer.byteLength, 1);
22 assert.compareArray(arr, [102], "ascii whitespace: " + pair[1]);