| OLD | NEW |
| 1 function log(message) | 1 function log(message) |
| 2 { | 2 { |
| 3 document.getElementById("result").innerHTML += message + "<br>"; | 3 document.getElementById("result").innerHTML += message + "<br>"; |
| 4 } | 4 } |
| 5 | 5 |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
| 9 } | 9 } |
| 10 | 10 |
| 11 var worker = createWorker(); | 11 var worker = createWorker(); |
| 12 worker.postMessage("eval typeof navigator"); | 12 worker.postMessage("eval typeof navigator"); |
| 13 worker.postMessage("eval navigator"); | 13 worker.postMessage("eval navigator"); |
| 14 worker.postMessage("eval navigator.appName"); | 14 worker.postMessage("eval navigator.appName"); |
| 15 worker.postMessage("eval navigator.appVersion.indexOf('WebKit') != 0"); | 15 worker.postMessage("eval navigator.appVersion.indexOf('WebKit') != 0"); |
| 16 worker.postMessage("eval typeof navigator.platform"); | 16 worker.postMessage("eval typeof navigator.platform"); |
| 17 worker.postMessage("eval navigator.userAgent.indexOf('WebKit') != 0"); | 17 worker.postMessage("eval navigator.userAgent.indexOf('WebKit') != 0"); |
| 18 worker.postMessage("eval typeof navigator.onLine"); | 18 worker.postMessage("eval typeof navigator.onLine"); |
| 19 worker.postMessage("eval navigator.appCodeName === 'Mozilla'"); |
| 20 worker.postMessage("eval navigator.product === 'Gecko'"); |
| 19 worker.postMessage("eval foo//bar"); | 21 worker.postMessage("eval foo//bar"); |
| 20 | 22 |
| 21 worker.onmessage = function(evt) { | 23 worker.onmessage = function(evt) { |
| 22 if (!/foo\/\/bar/.test(evt.data)) | 24 if (!/foo\/\/bar/.test(evt.data)) |
| 23 log(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>")); | 25 log(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>")); |
| 24 else { | 26 else { |
| 25 log("DONE"); | 27 log("DONE"); |
| 26 if (window.testRunner) | 28 if (window.testRunner) |
| 27 testRunner.notifyDone(); | 29 testRunner.notifyDone(); |
| 28 } | 30 } |
| 29 } | 31 } |
| OLD | NEW |