Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/generateKey/successes.js

Issue 2838603002: Added [SecureContext] to the subtle attribute (Closed)
Patch Set: Magic test starts doing differnt things out of the blue. Need to handle this properly. Avada Kedavr… Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698