| OLD | NEW |
| 1 <body> | 1 <body> |
| 2 <p>Test Worker constructor functionality. Should print a series of PASS messages
, followed with DONE.</p> | 2 <p>Test Worker constructor functionality. Should print a series of PASS messages
, followed with DONE.</p> |
| 3 <div id=result></div> | 3 <div id=result></div> |
| 4 <script> | 4 <script> |
| 5 function log(message) | 5 function log(message) |
| 6 { | 6 { |
| 7 document.getElementById("result").innerHTML += message + "<br>"; | 7 document.getElementById("result").innerHTML += message + "<br>"; |
| 8 } | 8 } |
| 9 | 9 |
| 10 var testCases = [ | 10 var testCases = [ |
| 11 "testArgumentException", | 11 "testArgumentException", |
| 12 "testRecursiveWorkerCreation", | 12 "testRecursiveWorkerCreation", |
| 13 "testNoArgument", | 13 "testNoArgument", |
| 14 "testEmptyScriptUrl", | |
| 15 "testInvalidScriptUrl", | 14 "testInvalidScriptUrl", |
| 16 "testNotExistentScriptUrl", | 15 "testNotExistentScriptUrl", |
| 16 "testEmptyScriptUrl", |
| 17 "testSuccessWorkerCreation", | 17 "testSuccessWorkerCreation", |
| 18 ]; | 18 ]; |
| 19 var testIndex = 0; | 19 var testIndex = 0; |
| 20 | 20 |
| 21 function runNextTest() | 21 function runNextTest() |
| 22 { | 22 { |
| 23 if (testIndex < testCases.length) { | 23 if (testIndex < testCases.length) { |
| 24 testIndex++; | 24 testIndex++; |
| 25 window[testCases[testIndex - 1]](); | 25 window[testCases[testIndex - 1]](); |
| 26 } else { | 26 } else { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 if (window.testRunner) { | 130 if (window.testRunner) { |
| 131 testRunner.dumpAsText(); | 131 testRunner.dumpAsText(); |
| 132 testRunner.waitUntilDone(); | 132 testRunner.waitUntilDone(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 runNextTest(); | 135 runNextTest(); |
| 136 | 136 |
| 137 </script> | 137 </script> |
| 138 </body> | 138 </body> |
| OLD | NEW |