| <title>EventSource: bogus MIME type</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| var source = new EventSource("resources/message.py?mime=x%20bogus") |
| source.onmessage = function() { |
| source.onerror = function(e) { |
| assert_equals(this.readyState, this.CLOSED) |
| assert_false(e.hasOwnProperty('data')) |
| assert_false(e.cancelable) |
| <!-- This tests "fails the connection" as well as making sure a simple |
| event is dispatched and not a MessageEvent --> |