Andrew Top | 61a8495 | 2019-04-30 15:07:33 -0700 | [diff] [blame] | 1 | <!doctype html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>EventSource: newline fest</title> |
| 5 | <script src="/resources/testharness.js"></script> |
| 6 | <script src="/resources/testharnessreport.js"></script> |
| 7 | </head> |
| 8 | <body> |
| 9 | <div id="log"></div> |
| 10 | <script> |
| 11 | var test = async_test() |
| 12 | test.step(function() { |
| 13 | var source = new EventSource("resources/message.py?message=data%3Atest%0D%0Adata%0Adata%3Atest%0D%0A%0D&newline=none") |
| 14 | source.onmessage = function(e) { |
| 15 | test.step(function() { |
| 16 | assert_equals("test\n\ntest", e.data) |
| 17 | source.close() |
| 18 | }) |
| 19 | test.done() |
| 20 | } |
| 21 | }) |
| 22 | </script> |
| 23 | </body> |
| 24 | </html> |
| 25 | |