2 if (window
.testRunner
) {
3 testRunner
.dumpAsText();
4 testRunner
.waitUntilDone();
5 waitUntilWorkerThreadsExit(runTests
);
7 log("NOTE: Test relies on window.testRunner to detect when worker threads have exited. Please run this test via DumpRenderTree");
8 waitUntilWorkerThreadsExit(runTests
);
13 if (window
.testRunner
)
14 log("PASS: workerThreadCount = " + internals
.workerThreadCount
);
15 var worker
= createWorker();
16 worker
.postMessage("ping");
17 worker
.onmessage = function(event
) {
18 if (window
.testRunner
) {
19 if (internals
.workerThreadCount
== 1)
20 log("PASS: Worker thread created");
22 log("FAIL: After thread creation: internals.workerThreadCount = " + internals
.workerThreadCount
);
25 // Shutdown the worker.
26 worker
.postMessage("close");
27 waitUntilWorkerThreadsExit(workerExited
);
31 function workerExited()
33 log("PASS: Worker exited when close() called.");