Closed Bug 1028934 Opened 6 years ago Closed 4 years ago
[XHR2] Some XMLHttp
Request .upload event tests fail
http://w3c-test.org/XMLHttpRequest/abort-during-upload.htm This test does client.send((new Array(10000)).join('a')) client.abort() and expects the following log of events: ['progress on XHR Upload', 'abort on XHR Upload', 'loadend on XHR Upload', 'progress on XHR', 'abort on XHR', 'loadend on XHR'] Gecko only fires ['abort on XHR', 'loadend on XHR'] http://w3c-test.org/XMLHttpRequest/send-timeout-events.htm This test sends a longish post body with xhr.timeout set to 1. It expects these events: ["upload.timeout", "upload.loadend", "timeout", "loadend"] but Gecko only sends these: ["timeout", "loadend"] So in both tests, Gecko sends fewer events for xhr.upload than the spec appears to dictate.
Summary: [XHR2] Some XMLHttpRequest upload event tests fail → [XHR2] Some XMLHttpRequest.upload event tests fail
Hi Josh, This is an attempt to let XMLHttpRequest upload passes the mentioned failed tests (https://bugzilla.mozilla.org/show_bug.cgi?id=1028934#c0). It can help to pass the tests, but I'm not sure about the multiple calls on DispatchProgressEvent sequentially for different events. Do you have suggestions about it? Thanks!
Attachment #8561847 - Flags: feedback?(josh)
Comment on attachment 8561847 [details] [diff] [review] First attempt Additional info: https://xhr.spec.whatwg.org/#request-error-steps
Attachment #8561847 - Flags: review?(bugs)
Will review in couple of days.
Comment on attachment 8561847 [details] [diff] [review] First attempt mUploadTransferred and mUploadTotal and responseLength and mLoadTotal might not be 0 here, and per spec they should be https://xhr.spec.whatwg.org/#request-error-steps Does web-platform perhaps miss a test for that?
Attachment #8561847 - Flags: review?(bugs) → review-
(In reply to Olli Pettay [:smaug] (high review load) from comment #5) > Does web-platform perhaps miss a test for that? I believe I asked the same question to jdm. Should we propose a test for this (the send 0 and 0 thing)?
Yeah, http://w3c-test.org/XMLHttpRequest/send-timeout-events.htm just checks the event order. Dhi, would you like to file an issue in https://github.com/w3c/web-platform-tests/ on making the test check the value of the ProgressEvent attributes?
(In reply to Josh Matthews [:jdm] from comment #7) > Yeah, http://w3c-test.org/XMLHttpRequest/send-timeout-events.htm just checks > the event order. Dhi, would you like to file an issue in > https://github.com/w3c/web-platform-tests/ on making the test check the > value of the ProgressEvent attributes? I have it on: https://github.com/w3c/web-platform-tests/issues/1628
Please be aware that I have been working on this (or something similar) in bug 918703, and have some patches there pending review.
Sounds like this should be closed, in that case. Decky and I should probably find another set of test failures to investigate, unless there are some XHR tests that you are absolutely not working on right now.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
I do have fixes for a bunch of XHR web platform test failures pending, but I haven't had time to look into any that don't have a related bug yet under metabug 726433. It might be worth finding any ones that aren't yet in Bugzilla, and noting whether they're ready to work on or pending spec discussion. Otherwise, there are at least three main issues I can recall off the top of my head that I haven't had time to look into: bug 918768, bug 697151, and the bugs related to returning the wrong exception code. Bear in mind that I'm also currently working on refactoring the XHR code (with :baku's supervision) in bug 1285036, so the code will likely be in some flux.
Resolution: DUPLICATE → FIXED
Oops, sorry, don't know how I ended up changing the resolution with that comment.
You need to log in before you can comment on or make changes to this bug.