Index: LayoutTests/crypto/resources/random-values-types.js |
diff --git a/LayoutTests/crypto/crypto-random-values-types.html b/LayoutTests/crypto/resources/random-values-types.js |
similarity index 75% |
rename from LayoutTests/crypto/crypto-random-values-types.html |
rename to LayoutTests/crypto/resources/random-values-types.js |
index 8d891ab55b53c15d970af91a21b0975a8b3ed642..f2e84e3f65bc7f2b3b27358466b956e4c430ffa0 100644 |
--- a/LayoutTests/crypto/crypto-random-values-types.html |
+++ b/LayoutTests/crypto/resources/random-values-types.js |
@@ -1,19 +1,13 @@ |
-<!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> |
+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 = [ |
@@ -48,9 +42,4 @@ function checkNonIntegerTypes() { |
checkIntegerTypes(); |
checkNonIntegerTypes(); |
-</script> |
-<script src="../fast/js/resources/js-test-post.js"></script> |
-</body> |
-</html> |
- |
- |
+finishJSTest(); |