Bug 128531 - XMLHttpRequestUpload should support ontimeout event handler
Summary: XMLHttpRequestUpload should support ontimeout event handler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 07:09 PST by youenn fablet
Modified: 2015-11-10 10:59 PST (History)
7 users (show)

See Also:


Attachments
Added ontimeout in XHR upload IDL and Header (4.55 KB, patch)
2014-02-10 07:21 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (451.73 KB, application/zip)
2014-02-10 08:12 PST, Build Bot
no flags Details
Increased size of data to upload to hit timeout in the new test (4.69 KB, patch)
2014-02-10 23:50 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (2.68 KB, patch)
2015-11-10 01:04 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-mavericks (608.08 KB, application/zip)
2015-11-10 01:50 PST, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-mavericks-wk2 (647.58 KB, application/zip)
2015-11-10 01:53 PST, Build Bot
no flags Details
Rebasing interfaces-expected.txt (4.48 KB, patch)
2015-11-10 01:56 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2014-02-10 07:09:52 PST
XMLHttpRequestUpload sends timeout event but has no ontimeout event handler.
We should add this handler as specified in http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest
Comment 1 youenn fablet 2014-02-10 07:21:04 PST
Created attachment 223708 [details]
Added ontimeout in XHR upload IDL and Header
Comment 2 Build Bot 2014-02-10 08:12:03 PST
Comment on attachment 223708 [details]
Added ontimeout in XHR upload IDL and Header

Attachment 223708 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5109972169916416

New failing tests:
http/tests/xmlhttprequest/upload-ontimeout.html
Comment 3 Build Bot 2014-02-10 08:12:05 PST
Created attachment 223715 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 youenn fablet 2014-02-10 23:50:31 PST
Created attachment 223819 [details]
Increased size of data to upload to hit timeout in the new test
Comment 5 youenn fablet 2014-04-15 00:54:43 PDT
The patch is still valid and runs XHR tests fine (at least for GTK).
Anybody willing to review it?
Comment 6 youenn fablet 2014-11-03 07:44:49 PST
This patch still runs well on GTK and Mac.
It aligns with Blink and Firefox.
Comment 7 youenn fablet 2015-11-10 01:04:49 PST
Created attachment 265155 [details]
Patch
Comment 8 Build Bot 2015-11-10 01:50:00 PST
Comment on attachment 265155 [details]
Patch

Attachment 265155 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/409378

New failing tests:
imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html
Comment 9 Build Bot 2015-11-10 01:50:04 PST
Created attachment 265157 [details]
Archive of layout-test-results from ews102 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 10 Build Bot 2015-11-10 01:53:08 PST
Comment on attachment 265155 [details]
Patch

Attachment 265155 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/409379

New failing tests:
imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html
Comment 11 Build Bot 2015-11-10 01:53:12 PST
Created attachment 265158 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 12 youenn fablet 2015-11-10 01:56:07 PST
Created attachment 265159 [details]
Rebasing interfaces-expected.txt
Comment 13 Chris Dumez 2015-11-10 09:13:58 PST
Comment on attachment 265159 [details]
Rebasing interfaces-expected.txt

Shouldn't we actually call this event handler? What's the point of exposing it if we don't really support it?
Comment 14 Chris Dumez 2015-11-10 09:25:01 PST
Comment on attachment 265159 [details]
Rebasing interfaces-expected.txt

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

> Source/WebCore/xml/XMLHttpRequestUpload.idl:40
> +    attribute EventHandler ontimeout;

This exposes the attribute but is never called from native side it seems. So why is this useful?
Comment 15 youenn fablet 2015-11-10 09:46:06 PST
> Shouldn't we actually call this event handler? What's the point of exposing
> it if we don't really support it?

upload.timeout event is supported in XMLHttpRequest::dispatchErrorEvents when passing timeout as event type.

> This exposes the attribute but is never called from native side it seems. So
> why is this useful?

The only missing thing is to expose it to user scripts.
It works well as can be seen from imported/w3c/web-platform-tests/XMLHttpRequest/send-timeout-events.htm which is now passing.

Is it sufficient?
Comment 16 Chris Dumez 2015-11-10 09:47:15 PST
Comment on attachment 265159 [details]
Rebasing interfaces-expected.txt

ok, thanks for clarifying.
Comment 17 WebKit Commit Bot 2015-11-10 10:59:43 PST
Comment on attachment 265159 [details]
Rebasing interfaces-expected.txt

Clearing flags on attachment: 265159

Committed r192256: <http://trac.webkit.org/changeset/192256>
Comment 18 WebKit Commit Bot 2015-11-10 10:59:50 PST
All reviewed patches have been landed.  Closing bug.