4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/common.js"></script>
8 <p id=
"description"></p>
9 <div id=
"console"></div>
12 description("Tests abandoning a crypto operation.");
14 // This test starts up a couple worker threads, which continuously generate
15 // RSA keys. It waits until each of the worker threads have started
16 // running, and then exits.
18 // The consequence is that once the test finishes, there should be
19 // outstanding crypto operations on the worker threads. This will exercise
20 // the cancellation/abandonment logic for these Promises.
28 for (var i
= 0; i
< kNumWorkers
; ++i
) {
29 allPromises
.push(new Promise(function(resolve
, reject
) {
30 var worker
= new Worker("resources/worker-infinite-loop-generateKey.js");
31 worker
.onmessage = function(event
)
39 Promise
.all(allPromises
).then(finishJSTest
);