| James Graham | 2120f70 | 2012-10-27 09:13:40 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>EventSource: onopen (announcing the connection)</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 | source = new EventSource("resources/message.php") |
| 14 | source.onopen = function(e) { |
| 15 | test.step(function() { |
| 16 | assert_equals(source.readyState, source.OPEN) |
| Odin Hørthe Omdal | ef5ab5f | 2013-04-04 12:06:27 | [diff] [blame^] | 17 | assert_false(e.hasOwnProperty('data')) |
| James Graham | 2120f70 | 2012-10-27 09:13:40 | [diff] [blame] | 18 | assert_false(e.bubbles) |
| 19 | assert_false(e.cancelable) |
| 20 | this.close() |
| 21 | }, this) |
| 22 | test.done() |
| 23 | } |
| 24 | }) |
| 25 | </script> |
| 26 | </body> |
| 27 | </html> |
| 28 | |