Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / crypto / subtle / abandon-crypto-operation.html
blob341dd77892de079bb15b81780c0b00e09004b3e4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/common.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
11 <script>
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.
22 jsTestIsAsync = true;
24 var allPromises = [];
26 var kNumWorkers = 3;
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)
33 debug(event.data);
34 resolve();
36 }));
39 Promise.all(allPromises).then(finishJSTest);
40 </script>
41 </body>
42 </html>