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 throws a SyntaxError when input has non-base64, non-ascii-whitespace characters
7 features: [uint8array-base64, TypedArray]
14 'Z−==', // U+2212 'Minus Sign'
15 'Z+==', // U+FF0B 'Fullwidth Plus Sign'
17 'Zg\u2009==', // thin space
18 'Zg\u2028==', // line separator
20 illegal.forEach(function(value) {
21 assert.throws(SyntaxError, function() {
22 Uint8Array.fromBase64(value)