mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>WebCryptoAPI: wrapKey() and unwrapKey()</title>
|
||||
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||
<link rel="help" href="https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-wrapKey">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="wrapKey_unwrapKey.js"></script>
|
||||
|
||||
<h1>wrapKey and unwrapKey Tests</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
run_test();
|
||||
</script>
|
|
@ -1,6 +1,8 @@
|
|||
// META: title=WebCryptoAPI: wrapKey() and unwrapKey()
|
||||
// META: timeout=long
|
||||
|
||||
// Tests for wrapKey and unwrapKey round tripping
|
||||
|
||||
function run_test() {
|
||||
var subtle = self.crypto.subtle;
|
||||
|
||||
var wrappers = []; // Things we wrap (and upwrap) keys with
|
||||
|
@ -9,7 +11,8 @@ function run_test() {
|
|||
|
||||
// Generate all the keys needed, then iterate over all combinations
|
||||
// to test wrapping and unwrapping.
|
||||
Promise.all([generateWrappingKeys(), generateKeysToWrap(), generateEcdhPeerKey()])
|
||||
promise_test(function() {
|
||||
return Promise.all([generateWrappingKeys(), generateKeysToWrap(), generateEcdhPeerKey()])
|
||||
.then(function(results) {
|
||||
var promises = [];
|
||||
wrappers.forEach(function(wrapper) {
|
||||
|
@ -18,19 +21,8 @@ function run_test() {
|
|||
})
|
||||
});
|
||||
return Promise.all(promises);
|
||||
}, function(err) {
|
||||
promise_test(function(test) {
|
||||
assert_unreached("A key failed to generate: " + err.name + ": " + err.message)
|
||||
}, "Could not run all tests")
|
||||
})
|
||||
.then(function() {
|
||||
done();
|
||||
}, function(err) {
|
||||
promise_test(function(test) {
|
||||
assert_unreached("A test failed to run: " + err.name + ": " + err.message)
|
||||
}, "Could not run all tests")
|
||||
});
|
||||
|
||||
}, "setup");
|
||||
|
||||
function generateWrappingKeys() {
|
||||
// There are five algorithms that can be used for wrapKey/unwrapKey.
|
||||
|
@ -513,5 +505,3 @@ function run_test() {
|
|||
function str2ab(str) { return Uint8Array.from( str.split(''), function(s){return s.charCodeAt(0)} ); }
|
||||
function ab2str(ab) { return String.fromCharCode.apply(null, new Uint8Array(ab)); }
|
||||
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
// META: timeout=long
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("wrapKey_unwrapKey.js");
|
||||
|
||||
run_test();
|
Loading…
Add table
Add a link
Reference in a new issue