Index: LayoutTests/crypto/resources/random-values-types.js |
diff --git a/LayoutTests/security/crypto-random-values-types.html b/LayoutTests/crypto/resources/random-values-types.js |
similarity index 72% |
rename from LayoutTests/security/crypto-random-values-types.html |
rename to LayoutTests/crypto/resources/random-values-types.js |
index 377c5933fe112b0c5184f87e216e727a52b76fe6..3557d142c164a2d55c99c3854f1305e7502a44bd 100644 |
--- a/LayoutTests/security/crypto-random-values-types.html |
+++ b/LayoutTests/crypto/resources/random-values-types.js |
@@ -1,20 +1,14 @@ |
-<!DOCTYPE html> |
-<html> |
-<head> |
-<script src="../fast/js/resources/js-test-pre.js"></script> |
-<script src="resources/utilities.js"></script> |
-</head> |
-<body> |
-<p id="description"></p> |
-<div id="console"></div> |
-<script> |
+if (self.importScripts) { |
+ importScripts('../../fast/js/resources/js-test-pre.js'); |
+} |
+ |
description("Tests which types are valid for crypto.randomValues."); |
-if (!window.ArrayBuffer) |
+if (!self.ArrayBuffer) |
debug("This test requres ArrayBuffers to run!"); |
-shouldBe("'crypto' in window", "true"); |
-shouldBe("'getRandomValues' in window.crypto", "true"); |
+shouldBe("'crypto' in self", "true"); |
+shouldBe("'getRandomValues' in self.crypto", "true"); |
function checkIntegerTypes() { |
var integerTypes = [ |
@@ -49,9 +43,4 @@ function checkNonIntegerTypes() { |
checkIntegerTypes(); |
checkNonIntegerTypes(); |
-</script> |
-<script src="../fast/js/resources/js-test-post.js"></script> |
-</body> |
-</html> |
- |
- |
+finishJSTest(); |