mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #3732 : mukilan/servo/xhr-issue-3630, r=jdm
This fixes issue #3630 A short summary of the changes: * Use atomic generation id to cancel inflight requests * Handles nested calls to abort, open, send inside handlers * Adds XHRReleaseMsg to delay freeing XHR object till all inflight events are processed * Handles both timeout, errors and abort/open in a symmetric fashion i.e All inflight events will be cancelled for timeouts, aborts, errors and on calling open. * Change the ErroredMsg enum to be more symmetric with the returned Error enum I noticed a few possible changes that could make the code for fetch task simpler: * We can remove the additional timer task and let the fetch task manage its own timer (or maybe the resource loader can do this.) * The CORS related steps could also be moved into the resource loader. * Right now upload events are not support. This requires some support from resource loader.
This commit is contained in:
commit
4e24e4d8e9
14 changed files with 259 additions and 174 deletions
|
@ -1,33 +1,32 @@
|
|||
[data-uri.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XHR method GET with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method GET with charset text/plain (base64)]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method GET with charset text/html]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method GET with charset image/png]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method POST with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method PUT with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method DELETE with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method HEAD with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method UNICORN with charset text/plain]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[XHR method GET with charset text/html;charset=UTF-8]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[send-network-error-async-events.sub.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XmlHttpRequest: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset)]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[send-network-error-sync-events.sub.htm]
|
||||
type: testharness
|
||||
[XmlHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
[xmlhttprequest-timeout-abortedonmain.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[xmlhttprequest-timeout-overrides.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[xmlhttprequest-timeout-overridesexpires.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[xmlhttprequest-timeout-worker-aborted.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -1,3 +0,0 @@
|
|||
[xmlhttprequest-timeout-worker-overrides.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -1,3 +1,6 @@
|
|||
[xmlhttprequest-timeout-worker-overridesexpires.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
|
||||
[Timeout test: timeout set to expired value before load fires, original timeout at 1000, reset at 400 to 300]
|
||||
disabled: racy test
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[xmlhttprequest-timeout-worker-simple.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -1,4 +0,0 @@
|
|||
[xmlhttprequest-timeout-worker-twice.html]
|
||||
type: testharness
|
||||
disabled: xhr issue #3630
|
||||
expected: TIMEOUT
|
Loading…
Add table
Add a link
Reference in a new issue