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

Side by Side Diff: LayoutTests/crypto/subtle/resources/worker-infinite-loop-generateKey.js

Issue 806913006: [WebCrypto] Move LayoutTests from crypto to crypto/subtle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update path for deserialize legacy tests Created 6 years 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 importScripts('common.js'); 1 importScripts('common.js');
2 2
3 function continuouslyGenerateRsaKey() 3 function continuouslyGenerateRsaKey()
4 { 4 {
5 var extractable = false; 5 var extractable = false;
6 var usages = ['sign', 'verify']; 6 var usages = ['sign', 'verify'];
7 // Note that the modulus length is small. 7 // Note that the modulus length is small.
8 var algorithm = {name: "RSASSA-PKCS1-v1_5", modulusLength: 512, publicExpone nt: hexStringToUint8Array("010001"), hash: {name: 'sha-1'}}; 8 var algorithm = {name: "RSASSA-PKCS1-v1_5", modulusLength: 512, publicExpone nt: hexStringToUint8Array("010001"), hash: {name: 'sha-1'}};
9 9
10 return crypto.subtle.generateKey(algorithm, extractable, usages).then(functi on(result) { 10 return crypto.subtle.generateKey(algorithm, extractable, usages).then(functi on(result) {
11 // Infinite recursion intentional! 11 // Infinite recursion intentional!
12 return continuouslyGenerateRsaKey(); 12 return continuouslyGenerateRsaKey();
13 }); 13 });
14 } 14 }
15 15
16 // Starts a Promise which continually generates new RSA keys. 16 // Starts a Promise which continually generates new RSA keys.
17 var unusedPromise = continuouslyGenerateRsaKey(); 17 var unusedPromise = continuouslyGenerateRsaKey();
18 18
19 // Inform the outer script that the worker started. 19 // Inform the outer script that the worker started.
20 postMessage("Worker started"); 20 postMessage("Worker started");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698