Bug 119966 - [eventsource] Declares an invalid URL in eventsource constructor, throw "SECURITY_ERR" but not "SyntaxError".
Summary: [eventsource] Declares an invalid URL in eventsource constructor, throw "SECU...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-17 18:47 PDT by tinazhao
Modified: 2024-02-19 11:35 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tinazhao 2013-08-17 18:47:48 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36

Steps to reproduce:
According to the spec description, if an invalid URL declares in eventsource constructor, the exception "SyntaxError" should throw.

Spec Info: Server-Sent Events Candidate Recommendation 11 December 2012  (http://www.w3.org/TR/2012/CR-eventsource-20121211/ ).
Spec Description:
"Resolve the URL specified in the first argument, relative to the entry script's base URL. [HTML]
If the previous step failed, then throw a SyntaxError exception."

- Test suite: https://github.com/w3c/web-platform-tests/tree/master/eventsource
- Test case: https://github.com/w3c/web-platform-tests/blob/master/eventsource/eventsource-constructor-url-bogus.htm

Actual results:
It throws object Error: SECURITY_ERR: DOM Exception 18.
This test Failed on Chrome 28.0.1500.95 m, got PASS on Firefox nightly 26.0a1 and Opera Next 12.16

Expected results:
It should throw DOMException SyntaxError: property "code" is expected 12.
Comment 1 Ahmad Saleem 2024-02-18 16:42:54 PST
Safari Technology Preview 188 seems to pass all WPT tests:

https://wpt.fyi/results/eventsource?label=master&label=experimental&aligned=&q=eventsource-constructor-url-bogus

@Anne - anything to add or should I just go ahead and close with 'RESOLVED WONTFIX' (Since it was never confirmed) else I would've opted for 'RESOLVED CONFIGURATION CHANGED'.
Comment 2 Anne van Kesteren 2024-02-19 11:35:24 PST
WORKSFORME seems more reasonable then (or maybe INVALID), but this was probably wrong and then corrected.