OLD | NEW |
1 function createArrayBufferViewContainingHelloWorld() | 1 function createArrayBufferViewContainingHelloWorld() |
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; | 7 return array; |
8 } | 8 } |
9 | 9 |
10 function createEmptyArrayBufferView() | 10 function createEmptyArrayBufferView() |
(...skipping 27 matching lines...) Expand all Loading... |
38 }; | 38 }; |
39 | 39 |
40 ws.onclose = function(closeEvent) | 40 ws.onclose = function(closeEvent) |
41 { | 41 { |
42 if (closeEvent.wasClean === true) | 42 if (closeEvent.wasClean === true) |
43 postMessage("PASS: closeEvent.wasClean is true."); | 43 postMessage("PASS: closeEvent.wasClean is true."); |
44 else | 44 else |
45 postMessage("FAIL: closeEvent.wasClean should be true, but was: " + clos
eEvent.wasClean); | 45 postMessage("FAIL: closeEvent.wasClean should be true, but was: " + clos
eEvent.wasClean); |
46 postMessage("DONE"); | 46 postMessage("DONE"); |
47 }; | 47 }; |
OLD | NEW |