| OLD | NEW |
| 1 function createArrayBufferContainingHelloWorld() | 1 function createArrayBufferContainingHelloWorld() |
| 2 { | 2 { |
| 3 var hello = "Hello, world!"; | 3 var hello = "Hello, world!"; |
| 4 var array = new Uint8Array(hello.length); | 4 var array = new Uint8Array(hello.length); |
| 5 for (var i = 0; i < hello.length; ++i) | 5 for (var i = 0; i < hello.length; ++i) |
| 6 array[i] = hello.charCodeAt(i); | 6 array[i] = hello.charCodeAt(i); |
| 7 return array.buffer; | 7 return array.buffer; |
| 8 } | 8 } |
| 9 | 9 |
| 10 function createEmptyArrayBuffer() | 10 function createEmptyArrayBuffer() |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 ws.onclose = function(closeEvent) | 38 ws.onclose = function(closeEvent) |
| 39 { | 39 { |
| 40 if (closeEvent.wasClean === true) | 40 if (closeEvent.wasClean === true) |
| 41 postMessage("PASS: closeEvent.wasClean is true."); | 41 postMessage("PASS: closeEvent.wasClean is true."); |
| 42 else | 42 else |
| 43 postMessage("FAIL: closeEvent.wasClean should be true, but was: " + clos
eEvent.wasClean); | 43 postMessage("FAIL: closeEvent.wasClean should be true, but was: " + clos
eEvent.wasClean); |
| 44 postMessage("DONE"); | 44 postMessage("DONE"); |
| 45 }; | 45 }; |
| OLD | NEW |