Closed
Bug 869865
Opened 11 years ago
Closed 11 years ago
[eventsource] enter source.onerror and throws assert_unreached: Reached unreachable code
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: tina.zhao, Assigned: wfernandom2004)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.10 (KHTML, like Gecko) Chrome/23.0.1262.0 Safari/537.10 Steps to reproduce: ServerSentEvent latest Editor's Draft 23 April 2013 (http://dev.w3.org/html5/eventsource/) test - Test wiki: http://www.w3.org/wiki/Webapps/Interop/ServerSentEvents - 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-multi-window.htm Actual results: Test case failed: source.onerror = function(e) { test.step(function() { assert_unreached() source.close() test.done() }) } Throws assertion: assert_unreached: Reached unreachable code Expected results: No assertion throws.
Assignee | ||
Updated•11 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Updated•11 years ago
|
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee | ||
Comment 1•11 years ago
|
||
EventSource has been implemented based on XMLHttpRequest implementation practices. Looking at W3C's XMLHttpRequest test cases it is possible to compare the EventSource test case (eventsource-constructor-url-multi-window.htm) with the XMLHttpRequest one (open-url-multi-window.htm). If you observe with attention the XMLHttpRequest test case you can find this: > function init() { > var client = new self[0].XMLHttpRequest() > client.onreadystatechange = function() { > assert_equals(client.responseText, "bottom\n") > } > client.open("GET", "folder.txt"); > } > <iframe src="resources/init.htm"></iframe> There are two "folder.txt" there. One of them is in the same directory of the test case and its text content is "top". The other one is in the "resources" subdirectory and its content is "bottom". As you can see, although the xhr test case opens requests just "folder.txt", the actual "folder.txt" returned is that one inside the "resources" subdirectory. Similarly, returning to the EventSource test case, this line calls for an non-existant "resources/resources/message.php". > source = new self[0].EventSource("resources/message.php") Therefore, it shall be corrected to: > source = new self[0].EventSource("message.php") With that correction, the test case is successful. Therefore we can conclude that either the eventsource test case is wrong or the xhr test case is wrong. Assuming that the eventsource test case is wrong, I will close and mark this bug as invalid.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•