crypto-random-values-types-expected.txt 2.26 KB
Newer Older
1 2 3 4 5 6 7
Tests which types are valid for crypto.randomValues.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS 'crypto' in window is true
PASS 'getRandomValues' in window.crypto is true
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
PASS random = crypto.getRandomValues(new Uint8Array(3)) is defined.
PASS random is an instance of Uint8Array
PASS view = new Uint8Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Int8Array(3)) is defined.
PASS random is an instance of Int8Array
PASS view = new Int8Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Uint8ClampedArray(3)) is defined.
PASS random is an instance of Uint8ClampedArray
PASS view = new Uint8ClampedArray(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Uint16Array(3)) is defined.
PASS random is an instance of Uint16Array
PASS view = new Uint16Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Int16Array(3)) is defined.
PASS random is an instance of Int16Array
PASS view = new Int16Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Uint32Array(3)) is defined.
PASS random is an instance of Uint32Array
PASS view = new Uint32Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
PASS random = crypto.getRandomValues(new Int32Array(3)) is defined.
PASS random is an instance of Int32Array
PASS view = new Int32Array(3) is defined.
PASS random = crypto.getRandomValues(view) is defined.
PASS random is view
43
PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: TypeMismatchError: DOM Exception 17.
44 45 46 47 48
PASS crypto.getRandomValues(new Float64Array(3)) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS buffer = new Uint8Array(32) is defined.
PASS buffer.buffer is defined.
PASS view = new DataView(buffer.buffer) is defined.
PASS crypto.getRandomValues(view) threw exception Error: TypeMismatchError: DOM Exception 17.
49 50 51 52
PASS successfullyParsed is true

TEST COMPLETE