blob: 9205822647de17966fb32f437c6a420a73a614a7 [file] [log] [blame]
CONSOLE ERROR: line 40: Refused to connect to 'http://disallowed.example.com/' because it violates the following Content Security Policy directive: "connect-src http://invalid http://127.0.0.1".
Test EventSource constructor functionality. Should print a series of PASS messages followed by DONE.
PASS: missing argument to EventSource constructor resulted in an exception (TypeError: Failed to construct 'EventSource': 1 argument required, but only 0 present.)
PASS: passing an empty string to the EventSource constructor resulted in an exception (SyntaxError: Failed to construct 'EventSource': Cannot open an EventSource to an empty URL.)
PASS: passing an invalid URL to the EventSource constructor resulted in an exception (SyntaxError: Failed to construct 'EventSource': Cannot open an EventSource to 'http://webserver:eighty/'. The URL is invalid.)
PASS: passing a Content-Security-Policy-blocked URL to the EventSource constructor resulted in an exception (SecurityError: Failed to construct 'EventSource': Refused to connect to 'http://disallowed.example.com/' because it violates the document's Content Security Policy.)
PASS: no exception when passing a second argument to the EventSource constructor
DONE