Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
|
esprehn
2014/06/05 01:06:53
Leave out <html>, <head> and <body>.
| |
| 3 <body> | |
| 4 <pre id='console'></pre> | |
|
esprehn
2014/06/05 01:06:53
You don't need this if you use js-test.js
| |
| 5 | |
| 6 <script> | |
| 7 function log(message) | |
| 8 { | |
| 9 document.getElementById('console').appendChild(document.createTextNode(messa ge + "\n")); | |
|
esprehn
2014/06/05 01:06:53
Why not just js-test.js for this? js-test has asyn
| |
| 10 } | |
| 11 | |
| 12 function runTest() { | |
| 13 var worker = new Worker('resources/worker-navigator-hardware-concurrency.js' ); | |
| 14 worker.onmessage = function(event) { | |
| 15 if (event.data == 'DONE') { | |
| 16 if (window.testRunner) | |
| 17 testRunner.notifyDone(); | |
| 18 } else | |
| 19 log(event.data); | |
| 20 } | |
| 21 worker.postMessage(''); | |
| 22 } | |
| 23 | |
| 24 if (window.testRunner) { | |
| 25 testRunner.dumpAsText(); | |
| 26 testRunner.waitUntilDone(); | |
| 27 } | |
| 28 window.onload = runTest; | |
| 29 </script> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |