| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <head> | 3 <script src="script-tests/eventsource-cors-non-http.js"></script> |
| 4 <script src="../../js-test-resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <script> | |
| 8 description("Test EventSource with non-HTTP protocol schemes in the URL."); | |
| 9 self.jsTestIsAsync = true; | |
| 10 | |
| 11 var count = 0; | |
| 12 new EventSource("ftp://127.0.0.1").onerror = | |
| 13 new EventSource("file:///etc/motd").onerror = | |
| 14 new EventSource("localhost:8080/").onerror = | |
| 15 new EventSource("tel:1234").onerror = function () { | |
| 16 if (this.readyState == EventSource.CLOSED) { | |
| 17 testPassed("got error event and readyState is CLOSED"); | |
| 18 } else { | |
| 19 testFailed("got error event but readyState is not CLOSED"); | |
| 20 this.close(); | |
| 21 } | |
| 22 if (count++ == 3) | |
| 23 finishJSTest(); | |
| 24 }; | |
| 25 </script> | |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |