diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/WebCryptoAPI | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/WebCryptoAPI')
-rw-r--r-- | testing/web-platform/tests/WebCryptoAPI/getRandomValues.any.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/web-platform/tests/WebCryptoAPI/getRandomValues.any.js b/testing/web-platform/tests/WebCryptoAPI/getRandomValues.any.js index 1a3370ea13..2b82b9bedb 100644 --- a/testing/web-platform/tests/WebCryptoAPI/getRandomValues.any.js +++ b/testing/web-platform/tests/WebCryptoAPI/getRandomValues.any.js @@ -1,6 +1,9 @@ // Step 1. test(function() { assert_throws_dom("TypeMismatchError", function() { + self.crypto.getRandomValues(new Float16Array(6)) + }, "Float16Array") + assert_throws_dom("TypeMismatchError", function() { self.crypto.getRandomValues(new Float32Array(6)) }, "Float32Array") assert_throws_dom("TypeMismatchError", function() { @@ -8,6 +11,10 @@ test(function() { }, "Float64Array") assert_throws_dom("TypeMismatchError", function() { + const len = 65536 / Float16Array.BYTES_PER_ELEMENT + 1; + self.crypto.getRandomValues(new Float16Array(len)); + }, "Float16Array (too long)") + assert_throws_dom("TypeMismatchError", function() { const len = 65536 / Float32Array.BYTES_PER_ELEMENT + 1; self.crypto.getRandomValues(new Float32Array(len)); }, "Float32Array (too long)") |