| Index: LayoutTests/crypto/resources/random-values-types.js
|
| diff --git a/LayoutTests/crypto/resources/random-values-types.js b/LayoutTests/crypto/resources/random-values-types.js
|
| deleted file mode 100644
|
| index 4aa39873504505db478f4a163e91c85862e4fbea..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/crypto/resources/random-values-types.js
|
| +++ /dev/null
|
| @@ -1,48 +0,0 @@
|
| -if (self.importScripts)
|
| - importScripts('../../resources/js-test.js');
|
| -
|
| -description("Tests which types are valid for crypto.randomValues.");
|
| -
|
| -if (!self.ArrayBuffer)
|
| - debug("This test requres ArrayBuffers to run!");
|
| -
|
| -shouldBe("'crypto' in self", "true");
|
| -shouldBe("'getRandomValues' in self.crypto", "true");
|
| -
|
| -function checkIntegerTypes() {
|
| - var integerTypes = [
|
| - "Uint8Array", "Int8Array", "Uint8ClampedArray",
|
| - "Uint16Array", "Int16Array",
|
| - "Uint32Array", "Int32Array",
|
| - ];
|
| - integerTypes.forEach(function(arrayType) {
|
| - shouldBeDefined("random = crypto.getRandomValues(new "+arrayType+"(3))");
|
| - shouldBeType("random", arrayType);
|
| -
|
| - shouldBeDefined("view = new "+arrayType+"(3)");
|
| - shouldBeDefined("random = crypto.getRandomValues(view)");
|
| - shouldBe("random", "view");
|
| - });
|
| -}
|
| -
|
| -function checkNonIntegerTypes() {
|
| - var floatTypes = [
|
| - "Float32Array", "Float64Array",
|
| - ];
|
| - floatTypes.forEach(function(arrayType) {
|
| - shouldThrow("crypto.getRandomValues(new "+arrayType+"(3))");
|
| - });
|
| -
|
| - shouldBeDefined("buffer = new Uint8Array(32)");
|
| - shouldBeDefined("buffer.buffer");
|
| - shouldBeDefined("view = new DataView(buffer.buffer)");
|
| - shouldThrow("crypto.getRandomValues(view)");
|
| -}
|
| -
|
| -shouldThrow("crypto.getRandomValues()");
|
| -shouldThrow("crypto.getRandomValues(undefined)");
|
| -shouldThrow("crypto.getRandomValues(null)");
|
| -checkIntegerTypes();
|
| -checkNonIntegerTypes();
|
| -
|
| -finishJSTest();
|
|
|