diff options
Diffstat (limited to 'dom/crypto/test/test_WebCrypto_Import_Keys_Too_Long.html')
-rw-r--r-- | dom/crypto/test/test_WebCrypto_Import_Keys_Too_Long.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dom/crypto/test/test_WebCrypto_Import_Keys_Too_Long.html b/dom/crypto/test/test_WebCrypto_Import_Keys_Too_Long.html new file mode 100644 index 0000000000..57dfb7072e --- /dev/null +++ b/dom/crypto/test/test_WebCrypto_Import_Keys_Too_Long.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> + +<head> +<title>WebCrypto Test Suite</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +<link rel="stylesheet" href="./test_WebCrypto.css"/> +<script src="/tests/SimpleTest/SimpleTest.js"></script> + +<!-- General testing framework --> +<script src="./test-array.js"></script> + +<script>/* <![CDATA[*/ +"use strict"; + +// ----------------------------------------------------------------------------- +TestArray.addTest( + "Import a key that is too long.", + function() { + var k = new Uint8Array(0x20000010); + window.crypto.subtle.importKey("raw", k, "AES-GCM", true, ["encrypt", "decrypt"]).then(key => { + return window.crypto.subtle.encrypt( + { name: "AES-GCM", iv: new ArrayBuffer(96 / 8) }, + key, new Uint8Array(32)); + }).then(error(this), complete(this)) + } +); +/* ]]>*/</script> +</head> + +<body> + +<div id="content"> + <div id="head"> + <b>Web</b>Crypto<br> + </div> + + <div id="start" onclick="start();">RUN ALL</div> + + <div id="resultDiv" class="content"> + Summary: + <span class="pass"><span id="passN">0</span> passed, </span> + <span class="fail"><span id="failN">0</span> failed, </span> + <span class="pending"><span id="pendingN">0</span> pending.</span> + <br/> + <br/> + + <table id="results"> + <tr> + <th>Test</th> + <th>Result</th> + <th>Time</th> + </tr> + </table> + + </div> + + <div id="foot"></div> +</div> + +</body> +</html> |