OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <pre id='console'></pre> |
| 3 |
| 4 <script> |
| 5 function log(message) |
| 6 { |
| 7 document.getElementById('console').appendChild(document.createTextNode(messa
ge + "\n")); |
| 8 } |
| 9 |
| 10 function runTest() { |
| 11 var worker = new Worker('resources/worker-navigator-hardware-concurrency.js'
); |
| 12 worker.onmessage = function(event) { |
| 13 if (event.data == 'DONE') { |
| 14 if (window.testRunner) |
| 15 testRunner.notifyDone(); |
| 16 } else |
| 17 log(event.data); |
| 18 } |
| 19 worker.postMessage(''); |
| 20 } |
| 21 |
| 22 if (window.testRunner) { |
| 23 testRunner.dumpAsText(); |
| 24 testRunner.waitUntilDone(); |
| 25 } |
| 26 window.onload = runTest; |
| 27 </script> |
| 28 </body> |
| 29 </html> |
OLD | NEW |