OLD | NEW |
1 var ws = new WebSocket("ws://127.0.0.1:8880/workers/resources/protocol-test?prot
ocol=superchat", ["chat", "superchat"]); | 1 var ws = new WebSocket("ws://127.0.0.1:8880/workers/resources/protocol-test?prot
ocol=superchat", ["chat", "superchat"]); |
2 | 2 |
3 if (ws.protocol === "") | 3 if (ws.protocol === "") |
4 postMessage("PASS: ws.protocol is equal to \"\""); | 4 postMessage("PASS: ws.protocol is equal to \"\""); |
5 else | 5 else |
6 postMessage("FAIL: ws.protocol should be \"\" but was \"" + ws.protocol + "\
""); | 6 postMessage("FAIL: ws.protocol should be \"\" but was \"" + ws.protocol + "\
""); |
7 | 7 |
8 ws.onopen = function() | 8 ws.onopen = function() |
9 { | 9 { |
10 postMessage("INFO: Connected"); | 10 postMessage("INFO: Connected"); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 { | 45 { |
46 postMessage("INFO: Exited onclose handler"); | 46 postMessage("INFO: Exited onclose handler"); |
47 | 47 |
48 if (ws.protocol === "superchat") | 48 if (ws.protocol === "superchat") |
49 postMessage("PASS: ws.protocol is equal to \"superchat\""); | 49 postMessage("PASS: ws.protocol is equal to \"superchat\""); |
50 else | 50 else |
51 postMessage("FAIL: ws.protocol should be \"superchat\" but was \"" + ws.
protocol + "\""); | 51 postMessage("FAIL: ws.protocol should be \"superchat\" but was \"" + ws.
protocol + "\""); |
52 | 52 |
53 postMessage("DONE"); | 53 postMessage("DONE"); |
54 } | 54 } |
OLD | NEW |