Bug 18655 - [XHR] OnProgress needs more test case
Summary: [XHR] OnProgress needs more test case
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-21 07:35 PDT by Julien Chaffraix
Modified: 2015-01-20 13:51 PST (History)
1 user (show)

See Also:


Attachments
Add 5 test cases (11.99 KB, patch)
2008-05-30 16:29 PDT, Julien Chaffraix
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2008-04-21 07:35:38 PDT
As mentioned in bug13596, we need more test case about onprogress event handler. On the top of my head:
- addEventListener("progress", mycallback, XXX) should work
- add checks for both interfaces (LSProgressEvent and ProgressEvent)
- calling abort() should reset m_receivedLength
- ...
Comment 1 Julien Chaffraix 2008-05-30 16:29:50 PDT
Created attachment 21444 [details]
Add 5 test cases
Comment 2 Darin Adler 2008-05-30 17:36:21 PDT
Comment on attachment 21444 [details]
Add 5 test cases

Nice! I love test cases!
Comment 3 Julien Chaffraix 2008-06-02 13:49:15 PDT
Committed in r34320.
Comment 4 Alexey Proskuryakov 2015-01-20 13:51:39 PST
Comment on attachment 21444 [details]
Add 5 test cases

View in context: https://bugs.webkit.org/attachment.cgi?id=21444&action=review

> LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress.html:35
> +// If content length is not given, it should not be called
> +req.onprogress = onProgressFailed;
> +req.open("GET", "resources/noContentLength.asis", false);
> +req.send(null);

This test seems wrong, there is no reason to not fire the progress event for responses with chunked encoding.

I'll fix.

> LayoutTests/http/tests/xmlhttprequest/resources/noContentLength.asis:1
> +<html>

This is not a properly formatted .asis file. It makes Apache return an empty response with "Content-Length: 0".