| <!DOCTYPE html> |
| <pre id='console'></pre> |
| |
| <script> |
| function log(message) |
| { |
| document.getElementById('console').appendChild(document.createTextNode(message + "\n")); |
| } |
| |
| function runTest() { |
| var worker = new Worker('resources/worker-navigator-hardware-concurrency.js'); |
| worker.onmessage = function(event) { |
| if (event.data == 'DONE') { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } else |
| log(event.data); |
| } |
| worker.postMessage(''); |
| } |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| window.onload = runTest; |
| </script> |
| </body> |
| </html> |