Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: LayoutTests/crypto/resources/random-values-types.js

Issue 806913006: [WebCrypto] Move LayoutTests from crypto to crypto/subtle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update path for deserialize legacy tests Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « LayoutTests/crypto/resources/random-values-limits.js ('k') | LayoutTests/crypto/resources/subtle-crypto-concurrent.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698