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

Unified Diff: LayoutTests/crypto/crypto-random-values.html

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 months 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/crypto-random-values.html
diff --git a/LayoutTests/crypto/crypto-random-values.html b/LayoutTests/crypto/crypto-random-values.html
deleted file mode 100644
index d68825b0e185968640dd26cc2a6b068ce717dc3d..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/crypto-random-values.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script>
-description("Tests crypto.randomValues.");
-
-if (!window.ArrayBuffer)
- debug("This test requres ArrayBuffers to run!");
-
-shouldBe("'crypto' in window", "true");
-shouldBe("'getRandomValues' in window.crypto", "true");
-
-try {
- // FIXME: This test is flaky. If we ran this test every second since the
- // beginning of the universe, on average, it would have failed
- // 2^{-748} times.
-
- var reference = new Uint8Array(100);
- var sample = new Uint8Array(100);
-
- crypto.getRandomValues(reference);
- crypto.getRandomValues(sample);
-
- var matchingBytes = 0;
-
- for (var i = 0; i < reference.length; i++) {
- if (reference[i] == sample[i])
- matchingBytes++;
- }
-
- shouldBe("matchingBytes < 100", "true");
-} catch(ex) {
- debug(ex);
-}
-
-</script>
-<script src="../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
-
-
« no previous file with comments | « no previous file | LayoutTests/crypto/crypto-random-values-expected.txt » ('j') | Source/bindings/v8/custom/V8CryptoCustom.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698