| Index: LayoutTests/crypto/exportKey-badParameters.html
|
| diff --git a/LayoutTests/crypto/exportKey-badParameters.html b/LayoutTests/crypto/exportKey-badParameters.html
|
| index 638d8b47b5768c74ed29cbbcb8805ff839957756..61244af2f04e1d586ba1e93a3c36deef573dba24 100644
|
| --- a/LayoutTests/crypto/exportKey-badParameters.html
|
| +++ b/LayoutTests/crypto/exportKey-badParameters.html
|
| @@ -13,10 +13,6 @@ description("Tests exportKey() given bad inputs.");
|
|
|
| jsTestIsAsync = true;
|
|
|
| -// Not keys
|
| -shouldThrow("crypto.subtle.exportKey('raw', null)");
|
| -shouldThrow("crypto.subtle.exportKey('raw', 3)");
|
| -
|
| function importAesKey()
|
| {
|
| var keyData = new Uint8Array(16);
|
| @@ -27,7 +23,21 @@ function importAesKey()
|
| return crypto.subtle.importKey('raw', keyData, algorithm, extractable, usages);
|
| }
|
|
|
| -importAesKey().then(function(result) {
|
| +Promise.resolve(null).then(function(result) {
|
| + // null is not a valid Key.
|
| + return crypto.subtle.exportKey('raw', null);
|
| +}).then(failAndFinishJSTest, function(result) {
|
| + error = result;
|
| + shouldBeNull("error");
|
| +
|
| + // 3 is not a valid Key.
|
| + return crypto.subtle.exportKey('raw', 3);
|
| +}).then(failAndFinishJSTest, function(result) {
|
| + error = result;
|
| + shouldBeNull("error");
|
| +
|
| + return importAesKey();
|
| +}).then(function(result) {
|
| key = result;
|
|
|
| // Invalid export format
|
|
|