| OLD | NEW |
| 1 // | 1 // |
| 2 // helpers.js | 2 // helpers.js |
| 3 // | 3 // |
| 4 // Helper functions used by several WebCryptoAPI tests | 4 // Helper functions used by several WebCryptoAPI tests |
| 5 // | 5 // |
| 6 | 6 |
| 7 var registeredAlgorithmNames = [ | 7 var registeredAlgorithmNames = [ |
| 8 "RSASSA-PKCS1-v1_5", | 8 "RSASSA-PKCS1-v1_5", |
| 9 "RSA-PSS", | 9 "RSA-PSS", |
| 10 "RSA-OAEP", | 10 "RSA-OAEP", |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 okaySubsets.push([]); | 212 okaySubsets.push([]); |
| 213 } | 213 } |
| 214 | 214 |
| 215 okaySubsets.push(validUsages.concat(mandatoryUsages).concat(validUsages)); /
/ Repeated values are allowed | 215 okaySubsets.push(validUsages.concat(mandatoryUsages).concat(validUsages)); /
/ Repeated values are allowed |
| 216 return okaySubsets; | 216 return okaySubsets; |
| 217 } | 217 } |
| 218 | 218 |
| 219 | 219 |
| 220 // Algorithm name specifiers are case-insensitive. Generate several | 220 // Algorithm name specifiers are case-insensitive. Generate several |
| 221 // case variations of a given name. | 221 // case variations of a given name. |
| 222 function allNameVariants(name) { | 222 function allNameVariants(name, slowTest) { |
| 223 var upCaseName = name.toUpperCase(); | 223 var upCaseName = name.toUpperCase(); |
| 224 var lowCaseName = name.toLowerCase(); | 224 var lowCaseName = name.toLowerCase(); |
| 225 var mixedCaseName = upCaseName.substring(0, 1) + lowCaseName.substring(1); | 225 var mixedCaseName = upCaseName.substring(0, 1) + lowCaseName.substring(1); |
| 226 | 226 |
| 227 // for slow tests effectively cut the amount of work in third by only |
| 228 // returning one variation |
| 229 if (slowTest) return [mixedCaseName]; |
| 227 return [upCaseName, lowCaseName, mixedCaseName]; | 230 return [upCaseName, lowCaseName, mixedCaseName]; |
| 228 } | 231 } |
| 229 | |
| 230 | |
| OLD | NEW |