OLD | NEW |
1 | 1 |
2 function run_test(algorithmNames) { | 2 function run_test(algorithmNames, slowTest) { |
3 var subtle = crypto.subtle; // Change to test prefixed implementations | 3 var subtle = crypto.subtle; // Change to test prefixed implementations |
4 | 4 |
5 setup({explicit_timeout: true}); | 5 setup({explicit_timeout: true}); |
6 | 6 |
7 // These tests check that generateKey successfully creates keys | 7 // These tests check that generateKey successfully creates keys |
8 // when provided any of a wide set of correct parameters. | 8 // when provided any of a wide set of correct parameters. |
9 // | 9 // |
10 // There are a lot of combinations of possible parameters, | 10 // There are a lot of combinations of possible parameters, |
11 // resulting in a very large number of tests | 11 // resulting in a very large number of tests |
12 // performed. | 12 // performed. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 }, function(err) { | 67 }, function(err) { |
68 assert_unreached("Threw an unexpected error: " + err.toString())
; | 68 assert_unreached("Threw an unexpected error: " + err.toString())
; |
69 }); | 69 }); |
70 }, testTag + ": generateKey" + parameterString(algorithm, extractable, u
sages)); | 70 }, testTag + ": generateKey" + parameterString(algorithm, extractable, u
sages)); |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 // Test all valid sets of parameters for successful | 74 // Test all valid sets of parameters for successful |
75 // key generation. | 75 // key generation. |
76 testVectors.forEach(function(vector) { | 76 testVectors.forEach(function(vector) { |
77 allNameVariants(vector.name).forEach(function(name) { | 77 allNameVariants(vector.name, slowTest).forEach(function(name) { |
78 allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { | 78 allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { |
79 allValidUsages(vector.usages, false, vector.mandatoryUsages).for
Each(function(usages) { | 79 allValidUsages(vector.usages, false, vector.mandatoryUsages).for
Each(function(usages) { |
80 [false, true].forEach(function(extractable) { | 80 [false, true].forEach(function(extractable) { |
81 testSuccess(algorithm, extractable, usages, vector.resul
tType, "Success"); | 81 testSuccess(algorithm, extractable, usages, vector.resul
tType, "Success"); |
82 }); | 82 }); |
83 }); | 83 }); |
84 }); | 84 }); |
85 }); | 85 }); |
86 }); | 86 }); |
87 | 87 |
88 } | 88 } |
OLD | NEW |