Changeset 154004 in webkit
- Timestamp:
- Aug 13, 2013 9:16:04 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153999 r154004 1 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest 4 https://bugs.webkit.org/show_bug.cgi?id=119714 5 6 Reviewed by Alexey Proskuryakov. 7 8 Add a layout test to validate the order in which the events are fired in case 9 of a xhr request error. Also update an existing test which was relying on the 10 outdated firing order. 11 12 * http/tests/xmlhttprequest/simple-cross-origin-progress-events-expected.txt: 13 * http/tests/xmlhttprequest/simple-cross-origin-progress-events.html: 14 * http/tests/xmlhttprequest/upload-request-error-event-order-expected.txt: Added. 15 * http/tests/xmlhttprequest/upload-request-error-event-order.html: Added. 16 1 17 2013-08-13 Gabor Abraham <abrhm@inf.u-szeged.hu> 2 18 -
trunk/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-progress-events-expected.txt
r104803 r154004 14 14 Test 3: The URL is not allowed for cross-origin requests and at least one upload event is listened for before doing the send. 15 15 upload.onloadstart 16 upload.onerror (expected) 16 17 onerror (expected) 17 18 Response length: 0 18 upload.onerror (expected)19 19 -
trunk/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
r120167 r154004 104 104 xhr.upload.onerror = function() { 105 105 log("upload.onerror (expected)") 106 if (window.testRunner)107 testRunner.notifyDone();108 106 } 109 107 xhr.onerror = function() { 110 108 log("onerror (expected)"); 111 109 log("Response length: " + xhr.responseText.length); 110 if (window.testRunner) 111 testRunner.notifyDone(); 112 112 } 113 113 xhr.onload = function() { -
trunk/Source/WebCore/ChangeLog
r154003 r154004 1 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest 4 https://bugs.webkit.org/show_bug.cgi?id=119714 5 6 Reviewed by Alexey Proskuryakov. 7 8 On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest 9 object as per the latest specification: 10 http://xhr.spec.whatwg.org/#request-error 11 12 This specification change was made in Sept 2010: 13 http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h 14 15 It addresses the following comment: 16 http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html 17 18 IE10 and since recently Blink behave according to specification but WebKit was firing the 19 events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of 20 'network error' or 'abort error'. WebKit was however behaving according to specification 21 in case of 'timeout error', which was inconsistent. 22 23 Test: http/tests/xmlhttprequest/upload-request-error-event-order.html 24 25 * xml/XMLHttpRequest.cpp: 26 (WebCore::XMLHttpRequest::networkError): 27 (WebCore::XMLHttpRequest::abortError): 28 1 29 2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 30 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r153926 r154004 912 912 { 913 913 genericError(); 914 m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent));915 914 if (!m_uploadComplete) { 916 915 m_uploadComplete = true; … … 918 917 m_upload->dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent)); 919 918 } 919 m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent)); 920 920 internalAbort(); 921 921 } … … 924 924 { 925 925 genericError(); 926 m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent));927 926 if (!m_uploadComplete) { 928 927 m_uploadComplete = true; … … 930 929 m_upload->dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent)); 931 930 } 931 m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent)); 932 932 } 933 933
Note: See TracChangeset
for help on using the changeset viewer.