Closed Bug 869432 Opened 11 years ago Closed 11 years ago

[eventsource] readyStage on eventsource:close() returns CONNECTING instead of CLOSED

Categories

(Core :: DOM: Core & HTML, defect)

23 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla24

People

(Reporter: tina.zhao, Assigned: wfernandom2004)

References

Details

Attachments

(1 file)

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:

Reproduce Step:
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-close.htm


Actual results:

Actual results:

Test case failed: 
assert_equals(source.readyState, source.CLOSED, "closed readyState");
readyState returns CONNECTING


Expected results:

Expected results:

assert_equals(source.readyState, source.CLOSED, "closed readyState");
readyState returns CLOSED succesfully
How exactly can I see the issue here ?
Can you please provide some more specific steps to reproduce the problem ?
https://developer.mozilla.org/en/Bug_writing_guidelines
See Also: → 869865
See Also: → 869874
See Also: → 869875
See Also: → 869878
See Also: → 869882
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Paul, for future reference isssues with DOM objects are DOM, not JS.

Olli, do you know who owns this code nowadays?
Assignee: general → nobody
Component: JavaScript Engine → DOM
Flags: needinfo?(bugs)
Hello Olli, how are you? I will take a look on this. Do you have information if this and the other six related bugs are due recent changes in the spec or if they are due wrong implementation of the initial spec?
Assignee: nobody → wfernandom2004
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?
Hi Wellington!
It would be great if you had time to look at this.
I was told the test suite can be run here http://w3c-test.org/web-platform-tests/master/eventsource/
We should try to follow the latest spec.
Flags: needinfo?(bugs)
Flags: needinfo?
Hmmm, ok, I've found that, according the updated spec, when a 204 (No data) Http response is sent the EventSource shall close and stop reconnecting. Since the 204 http code is considered a successful request code, this is the root cause for the failure. However, it is not clear in the spec if in this case:
- the user agent should or not to announce the connection (i.e. to fire an open event);
- the user agent should or not to fail the connection (In my understanding, by reading the test code, the user agent is supposed to fire an error event and close the connection).
OS: Windows 7 → All
Hardware: x86_64 → All
Attached patch patchSplinter Review
I tried to push in into the Try-Server, but unfortunately my account has been disabled due inactivity.
Attachment #751533 - Flags: review?(bugs)
Ah, the bug summary is wrong. The failing assertion isn't about close().
Comment on attachment 751533 [details] [diff] [review]
patch

r+ assuming good tryserver results.
Attachment #751533 - Flags: review?(bugs) → review+
Attachment #751533 - Flags: checkin?(bugs)
Blocks: 869865
Comment on attachment 751533 [details] [diff] [review]
patch

Thanks for the patch!

One request, in the future, please make sure that for future patches, you have Mercurial configured to generate all the necessary commit information in the patch. It makes life easier for those landing on your behalf.
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Attachment #751533 - Flags: checkin?(bugs) → checkin+
https://hg.mozilla.org/mozilla-central/rev/dd70bcf3f479
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
See Also: 869874
See Also: → 662073
See Also: 869878
See Also: 869865, 869875, 869882
Verified. The test case get PASS on Firefox: nightly 26.0a1 (2013-08-13).
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: