blob: bae499feed949cb5db9590d3f733190987a8fd44 [file] [log] [blame]
fpizlo@apple.comf72d8a82016-07-18 20:31:20 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
4<script src="../resources/js-test-pre.js"></script>
5</head>
6<body>
7<script>
8description("Starts a lot of workers that do crazy things.");
9if (window.testRunner)
10 testRunner.waitUntilDone();
11
12var count = 100;
13var verbose = false;
14
15var numWorkers = 0;
16function startWorker(file)
17{
18 debug("Starting worker: " + file);
19 numWorkers++;
20 var worker = new Worker(file);
21 worker.onmessage = function(event) {
22 if (event.data == "done") {
23 if (verbose)
24 debug("Finished worker: " + file);
25 if (--numWorkers)
26 return;
27 debug("All workers done!");
28 done();
29 return;
30 }
31
32 debug("Event from " + file + ": " + event.data);
33 };
34}
35
36function start()
37{
38 startWorker("tests/3d-cube.js");
39 startWorker("tests/3d-morph.js");
40 startWorker("tests/3d-raytrace.js");
41 startWorker("tests/access-binary-trees.js");
42 startWorker("tests/access-fannkuch.js");
43 startWorker("tests/access-nbody.js");
44 startWorker("tests/access-nsieve.js");
45 startWorker("tests/bitops-3bit-bits-in-byte.js");
46 startWorker("tests/bitops-bits-in-byte.js");
47 startWorker("tests/bitops-bitwise-and.js");
48 startWorker("tests/bitops-nsieve-bits.js");
49 startWorker("tests/controlflow-recursive.js");
50 startWorker("tests/crypto-aes.js");
51 startWorker("tests/crypto-md5.js");
52 startWorker("tests/crypto-sha1.js");
53 startWorker("tests/date-format-tofte.js");
54 startWorker("tests/date-format-xparb.js");
55 startWorker("tests/math-cordic.js");
56 startWorker("tests/math-partial-sums.js");
57 startWorker("tests/math-spectral-norm.js");
58 startWorker("tests/regexp-dna.js");
59 startWorker("tests/string-base64.js");
60 startWorker("tests/string-fasta.js");
61 startWorker("tests/string-tagcloud.js");
62 startWorker("tests/string-unpack-code.js");
63 startWorker("tests/string-validate-input.js");
64}
65
66function done()
67{
68 if (!--count) {
69 debug("Done with test!");
70 if (window.testRunner)
71 testRunner.notifyDone();
72 return;
73 }
74
75 start();
76}
77
78start();
79</script>
80<script src="../resources/js-test-post.js"></script>
81</body>
82</html>