()
| 185 | var es = new EventSource(url + "?estest=" + encodeURIComponent(commonHeaders + "\n\n" + body)); |
| 186 | var s = ""; |
| 187 | var f = function () { |
| 188 | es.onerror = es.onmessage = undefined; |
| 189 | es.close(); |
| 190 | strictEqual(s, "", "Once the end of the file is reached, any pending data must be discarded. (If the file ends in the middle of an event, before the final empty line, the incomplete event is not dispatched.)"); |
| 191 | start(); |
| 192 | }; |
| 193 | es.onmessage = function (e) { |
| 194 | s = e.data; |
| 195 | f(); |