Changeset 220731 in webkit
- Timestamp:
- Aug 14, 2017 6:36:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r220730 r220731 1 2017-08-14 Chris Dumez <cdumez@apple.com> 2 3 XHR should only fire an abort event if the cancellation was requested by the client 4 https://bugs.webkit.org/show_bug.cgi?id=175546 5 6 Reviewed by Youenn Fablet. 7 8 * http/tests/navigation/page-cache-xhr-expected.txt: 9 * http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt: Copied from LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt. 10 * http/tests/navigation/page-cache-xhr-in-pagehide.html: Copied from LayoutTests/http/tests/navigation/page-cache-xhr.html. 11 * http/tests/navigation/page-cache-xhr.html: 12 When an XHR is pending and navigating away, we would send an abort event before the navigation and an error event after 13 restoring from PageCache. This bug was not seen before because the test only checked for error events, not abort ones. 14 The expected behavior is now that we fire an error event before navigating away, similar to the non-PageCache case. 15 The only case where the error event should be fired after restoring from PageCache is when an XHR is done in the pagehide 16 event handler, because it is too late to send the error event to the page before navigating in this case. I added test 17 coverage for this case. 18 19 * http/tests/xmlhttprequest/navigation-should-abort-expected.txt: 20 * http/tests/xmlhttprequest/navigation-should-abort.html: 21 This test was expecting an abort event on navigation which is against spec. This test was failing in Blink too. 22 Update the test to expect an error event instead. 23 1 24 2017-08-14 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/LayoutTests/fast/frames/frame-unload-crash-expected.txt
r204163 r220731 1 1 frame "<!--framePath //<!--frame0-->/<!--frame0-->-->" - has 1 onunload handler(s) 2 CONSOLE MESSAGE: line 13: XMLHttpRequest cannot load frame-unload-crash-2.html due to access control checks.3 2 This is a test for bug 25136: CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame. If successful, PASS should be printed below. 4 3 -
trunk/LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt
r181480 r220731 5 5 6 6 pageshow - not from cache 7 PASS Executed the XHR error handler before entering PageCache 8 PASS xhr.status is 0 7 9 pagehide - entering cache 8 10 pageshow - from cache 9 11 PASS Page did enter and was restored from the page cache 10 PASS Executed the XHR error handler after restoring from page cache11 PASS xhr.status is 012 12 PASS successfullyParsed is true 13 13 -
trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt
r220730 r220731 1 CONSOLE MESSAGE: line 35: XMLHttpRequest cannot load http://127.0.0.1:8000/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain due to access control checks. 1 2 Tests that a page with a loading XMLHttpRequest goes into the page cache. 2 3 … … 8 9 pageshow - from cache 9 10 PASS Page did enter and was restored from the page cache 10 PASS Executed the XHR error handler after restoring from page cache11 PASS Executed the XHR error handler after restoring from PageCache 11 12 PASS xhr.status is 0 12 13 PASS successfullyParsed is true -
trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html
r220730 r220731 27 27 finishJSTest(); 28 28 } 29 xhr = new XMLHttpRequest(); 30 xhr.onload = xhrLoaded; 31 xhr.onabort = xhrAbort; 32 xhr.onerror = xhrError; 33 // Slow loading XHR (3-second stall). 34 xhr.open("GET", "/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain", true); 35 xhr.send(); 29 36 }, false); 30 37 … … 35 42 } 36 43 44 function xhrAbort() { 45 testFailed("Executed the XHR abort handler unexpectedly"); 46 finishJSTest(); 47 } 48 37 49 function xhrError() { 38 50 if (restoredFromPageCache) 39 testPassed("Executed the XHR error handler after restoring from page cache");51 testPassed("Executed the XHR error handler after restoring from PageCache"); 40 52 else 41 testFailed("Executed the XHR error handler before restoring from page cache"); 42 53 testFailed("Executed the XHR error handler before entering PageCache"); 43 54 shouldBe("xhr.status", "0"); 44 55 finishJSTest(); … … 46 57 47 58 window.addEventListener('load', function() { 48 xhr = new XMLHttpRequest();49 xhr.onload = xhrLoaded;50 xhr.onerror = xhrError;51 // Slow loading XHR (3-second stall).52 xhr.open("GET", "/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain", true);53 xhr.send();54 55 59 // This needs to happen in a setTimeout because a navigation inside the onload handler would 56 60 // not create a history entry. -
trunk/LayoutTests/http/tests/navigation/page-cache-xhr.html
r196988 r220731 18 18 testPassed("Page did enter and was restored from the page cache"); 19 19 restoredFromPageCache = true; 20 setTimeout(finishJSTest, 0); 20 21 } 21 22 }, false); … … 35 36 } 36 37 38 function xhrAbort() { 39 testFailed("Executed the XHR abort handler unexpectedly"); 40 finishJSTest(); 41 } 42 37 43 function xhrError() { 38 if (restoredFromPageCache) 39 test Passed("Executed the XHR error handler after restoring from page cache");40 else41 testFailed("Executed the XHR error handler before restoring from page cache");44 if (restoredFromPageCache) { 45 testFailed("Executed the XHR error handler after restoring from PageCache"); 46 return; 47 } 42 48 49 testPassed("Executed the XHR error handler before entering PageCache"); 43 50 shouldBe("xhr.status", "0"); 44 finishJSTest();45 51 } 46 52 … … 48 54 xhr = new XMLHttpRequest(); 49 55 xhr.onload = xhrLoaded; 56 xhr.onabort = xhrAbort; 50 57 xhr.onerror = xhrError; 51 58 // Slow loading XHR (3-second stall). -
trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort-expected.txt
r144430 r220731 1 CONSOLE MESSAGE: line 1 4: PASS: Expected 'abort', got 'abort'.1 CONSOLE MESSAGE: line 11: PASS: Expected 'error', got 'error'. 2 2 If this text shows up, you've successfully navigated to 'navigation-target.html'. -
trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort.html
r144430 r220731 9 9 req.open("GET", "resources/endlessxml.php"); 10 10 req.onerror = function () { 11 console.log(" FAIL: Expected 'abort', got 'error'.");11 console.log("PASS: Expected 'error', got 'error'."); 12 12 }; 13 13 req.onabort = function () { 14 console.log(" PASS: Expected 'abort', got 'abort'.");14 console.log("FAIL: Expected 'error', got 'abort'."); 15 15 }; 16 16 req.send(null); -
trunk/LayoutTests/imported/w3c/ChangeLog
r220707 r220731 1 2017-08-14 Chris Dumez <cdumez@apple.com> 2 3 XHR should only fire an abort event if the cancellation was requested by the client 4 https://bugs.webkit.org/show_bug.cgi?id=175546 5 6 Reviewed by Youenn Fablet. 7 8 Rebaseline several WPT tests now that a different error is sometimes used and that 9 more checks are passing. 10 11 * web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt: 12 * web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt: 13 * web-platform-tests/cors/allow-headers-expected.txt: 14 * web-platform-tests/cors/origin-expected.txt: 15 * web-platform-tests/cors/request-headers-expected.txt: 16 * web-platform-tests/cors/response-headers-expected.txt: 17 * web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt: 18 * web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt: 19 * web-platform-tests/resource-timing/resource_TAO_multi-expected.txt: 20 * web-platform-tests/resource-timing/resource_TAO_null-expected.txt: 21 * web-platform-tests/resource-timing/resource_TAO_origin-expected.txt: 22 * web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt: 23 * web-platform-tests/resource-timing/resource_TAO_space-expected.txt: 24 * web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt: 25 * web-platform-tests/resource-timing/resource_TAO_zero-expected.txt: 26 1 27 2017-08-14 Chris Dumez <cdumez@apple.com> 2 28 -
trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt
r204090 r220731 1 1 2 FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil) assert_true: should get an error event expected true got false 2 PASS XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil) 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt
r219663 r220731 1 1 Blocked access to external URL http://nonexistent-origin.localhost}:8800/ 2 2 3 FAIL XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) assert_throws: function "function () 4 { 5 xhr.send("Test Message"); 6 }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 3 PASS XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) 7 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cors/allow-headers-expected.txt
r219663 r220731 46 46 47 47 48 FAIL Allow origin: * The operation was aborted.49 FAIL Allow origin: _*__ The operation was aborted.50 FAIL Allow origin: [tab]* The operation was aborted.51 FAIL Allow origin: http://localhost:8800 The operation was aborted.52 FAIL Allow origin: _http://localhost:8800 The operation was aborted.53 FAIL Allow origin: _http://localhost:8800___[tab]_ The operation was aborted.54 FAIL Allow origin: [tab]http://localhost:8800 The operation was aborted.55 FAIL Disallow origin: http://www1.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 56 FAIL Disallow origin: //localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 57 FAIL Disallow origin: ://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 58 FAIL Disallow origin: ftp://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 59 FAIL Disallow origin: http:://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 60 FAIL Disallow origin: http:/localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 61 FAIL Disallow origin: http:localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 62 FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 63 FAIL Disallow origin: http://localhost:8800? assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 64 FAIL Disallow origin: http://localhost:8800/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 65 FAIL Disallow origin: http://localhost:8800 / assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 66 FAIL Disallow origin: http://localhost:8800# assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 67 FAIL Disallow origin: http://localhost:8800%23 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 68 FAIL Disallow origin: http://localhost:8800:80 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 69 FAIL Disallow origin: http://localhost:8800, * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 70 FAIL Disallow origin: http://localhost:8800\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 71 FAIL Disallow origin: HTTP://LOCALHOST:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 72 FAIL Disallow origin: HTTP://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 73 FAIL Disallow origin: - assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 74 FAIL Disallow origin: ** assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 75 FAIL Disallow origin: \0* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 76 FAIL Disallow origin: *\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 77 FAIL Disallow origin: '*' assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 78 FAIL Disallow origin: "*" assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 79 FAIL Disallow origin: * * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 80 FAIL Disallow origin: *http://* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 81 FAIL Disallow origin: *http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 82 FAIL Disallow origin: * http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 83 FAIL Disallow origin: *, http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 84 FAIL Disallow origin: \0http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 85 FAIL Disallow origin: null http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 86 FAIL Disallow origin: http://example.net assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 87 FAIL Disallow origin: null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 88 FAIL Disallow origin: assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 89 FAIL Disallow origin: http://localhost:8800/cors/allow-headers.htm assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 90 FAIL Disallow origin: http://localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 91 FAIL Disallow origin: http://www1.localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 48 FAIL Allow origin: * A network error occurred. 49 FAIL Allow origin: _*__ A network error occurred. 50 FAIL Allow origin: [tab]* A network error occurred. 51 FAIL Allow origin: http://localhost:8800 A network error occurred. 52 FAIL Allow origin: _http://localhost:8800 A network error occurred. 53 FAIL Allow origin: _http://localhost:8800___[tab]_ A network error occurred. 54 FAIL Allow origin: [tab]http://localhost:8800 A network error occurred. 55 PASS Disallow origin: http://www1.localhost:8800 56 PASS Disallow origin: //localhost:8800 57 PASS Disallow origin: ://localhost:8800 58 PASS Disallow origin: ftp://localhost:8800 59 PASS Disallow origin: http:://localhost:8800 60 PASS Disallow origin: http:/localhost:8800 61 PASS Disallow origin: http:localhost:8800 62 PASS Disallow origin: localhost:8800 63 PASS Disallow origin: http://localhost:8800? 64 PASS Disallow origin: http://localhost:8800/ 65 PASS Disallow origin: http://localhost:8800 / 66 PASS Disallow origin: http://localhost:8800# 67 PASS Disallow origin: http://localhost:8800%23 68 PASS Disallow origin: http://localhost:8800:80 69 PASS Disallow origin: http://localhost:8800, * 70 PASS Disallow origin: http://localhost:8800\0 71 PASS Disallow origin: HTTP://LOCALHOST:8800 72 PASS Disallow origin: HTTP://localhost:8800 73 PASS Disallow origin: - 74 PASS Disallow origin: ** 75 PASS Disallow origin: \0* 76 PASS Disallow origin: *\0 77 PASS Disallow origin: '*' 78 PASS Disallow origin: "*" 79 PASS Disallow origin: * * 80 PASS Disallow origin: *http://* 81 PASS Disallow origin: *http://localhost:8800 82 PASS Disallow origin: * http://localhost:8800 83 PASS Disallow origin: *, http://localhost:8800 84 PASS Disallow origin: \0http://localhost:8800 85 PASS Disallow origin: null http://localhost:8800 86 PASS Disallow origin: http://example.net 87 PASS Disallow origin: null 88 PASS Disallow origin: 89 PASS Disallow origin: http://localhost:8800/cors/allow-headers.htm 90 PASS Disallow origin: http://localhost:8800/cors/ 91 PASS Disallow origin: http://www1.localhost:8800/cors/ 92 92 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cors/origin-expected.txt
r219663 r220731 62 62 Harness Error (FAIL), message = 1 duplicate test name: "Disallow origin: localhost:8800" 63 63 64 FAIL Allow origin: * The operation was aborted.65 FAIL Allow origin: _*__ The operation was aborted.66 FAIL Allow origin: [tab]* The operation was aborted.67 FAIL Allow origin: http://localhost:8800 The operation was aborted.68 FAIL Allow origin: _http://localhost:8800 The operation was aborted.69 FAIL Allow origin: _http://localhost:8800___[tab]_ The operation was aborted.70 FAIL Allow origin: [tab]http://localhost:8800 The operation was aborted.71 FAIL Disallow origin: http://www1.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 72 FAIL Disallow origin: //localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 73 FAIL Disallow origin: ://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 74 FAIL Disallow origin: ftp://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 75 FAIL Disallow origin: http:://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 76 FAIL Disallow origin: http:/localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 77 FAIL Disallow origin: http:localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 78 FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 79 FAIL Disallow origin: http://localhost:8800? assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 80 FAIL Disallow origin: http://localhost:8800/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 81 FAIL Disallow origin: http://localhost:8800 / assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 82 FAIL Disallow origin: http://localhost:8800# assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 83 FAIL Disallow origin: http://localhost:8800%23 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 84 FAIL Disallow origin: http://localhost:8800:80 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 85 FAIL Disallow origin: http://localhost:8800, * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 86 FAIL Disallow origin: http://localhost:8800\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 87 FAIL Disallow origin: HTTP://LOCALHOST:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 88 FAIL Disallow origin: HTTP://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 89 FAIL Disallow origin: - assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 90 FAIL Disallow origin: ** assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 91 FAIL Disallow origin: \0* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 92 FAIL Disallow origin: *\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 93 FAIL Disallow origin: '*' assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 94 FAIL Disallow origin: "*" assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 95 FAIL Disallow origin: * * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 96 FAIL Disallow origin: * null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 97 FAIL Disallow origin: *http://* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 98 FAIL Disallow origin: *http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 99 FAIL Disallow origin: * http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 100 FAIL Disallow origin: *, http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 101 FAIL Disallow origin: \0http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 102 FAIL Disallow origin: null http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 103 FAIL Disallow origin: http://example.net assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 104 FAIL Disallow origin: null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 105 FAIL Disallow origin: null * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 106 FAIL Disallow origin: assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 107 FAIL Disallow origin: http://localhost:8800/cors/origin.htm assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 108 FAIL Disallow origin: http://localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 109 FAIL Disallow origin: http://www1.localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 110 FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 111 FAIL Disallow origin: .localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 112 FAIL Disallow origin: *.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 113 FAIL Disallow origin: http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 114 FAIL Disallow origin: http://.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 115 FAIL Disallow origin: http://*.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 116 FAIL Disallow multiple headers (, *) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 117 FAIL Disallow multiple headers (*, ) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 118 FAIL Disallow multiple headers (*, *) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 119 FAIL Disallow multiple headers (, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 120 FAIL Disallow multiple headers (*, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 121 FAIL Disallow multiple headers (http://localhost:8800, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 64 FAIL Allow origin: * A network error occurred. 65 FAIL Allow origin: _*__ A network error occurred. 66 FAIL Allow origin: [tab]* A network error occurred. 67 FAIL Allow origin: http://localhost:8800 A network error occurred. 68 FAIL Allow origin: _http://localhost:8800 A network error occurred. 69 FAIL Allow origin: _http://localhost:8800___[tab]_ A network error occurred. 70 FAIL Allow origin: [tab]http://localhost:8800 A network error occurred. 71 PASS Disallow origin: http://www1.localhost:8800 72 PASS Disallow origin: //localhost:8800 73 PASS Disallow origin: ://localhost:8800 74 PASS Disallow origin: ftp://localhost:8800 75 PASS Disallow origin: http:://localhost:8800 76 PASS Disallow origin: http:/localhost:8800 77 PASS Disallow origin: http:localhost:8800 78 PASS Disallow origin: localhost:8800 79 PASS Disallow origin: http://localhost:8800? 80 PASS Disallow origin: http://localhost:8800/ 81 PASS Disallow origin: http://localhost:8800 / 82 PASS Disallow origin: http://localhost:8800# 83 PASS Disallow origin: http://localhost:8800%23 84 PASS Disallow origin: http://localhost:8800:80 85 PASS Disallow origin: http://localhost:8800, * 86 PASS Disallow origin: http://localhost:8800\0 87 PASS Disallow origin: HTTP://LOCALHOST:8800 88 PASS Disallow origin: HTTP://localhost:8800 89 PASS Disallow origin: - 90 PASS Disallow origin: ** 91 PASS Disallow origin: \0* 92 PASS Disallow origin: *\0 93 PASS Disallow origin: '*' 94 PASS Disallow origin: "*" 95 PASS Disallow origin: * * 96 PASS Disallow origin: * null 97 PASS Disallow origin: *http://* 98 PASS Disallow origin: *http://localhost:8800 99 PASS Disallow origin: * http://localhost:8800 100 PASS Disallow origin: *, http://localhost:8800 101 PASS Disallow origin: \0http://localhost:8800 102 PASS Disallow origin: null http://localhost:8800 103 PASS Disallow origin: http://example.net 104 PASS Disallow origin: null 105 PASS Disallow origin: null * 106 PASS Disallow origin: 107 PASS Disallow origin: http://localhost:8800/cors/origin.htm 108 PASS Disallow origin: http://localhost:8800/cors/ 109 PASS Disallow origin: http://www1.localhost:8800/cors/ 110 PASS Disallow origin: localhost:8800 111 PASS Disallow origin: .localhost:8800 112 PASS Disallow origin: *.localhost:8800 113 PASS Disallow origin: http://localhost:8800 114 PASS Disallow origin: http://.localhost:8800 115 PASS Disallow origin: http://*.localhost:8800 116 PASS Disallow multiple headers (, *) 117 PASS Disallow multiple headers (*, ) 118 PASS Disallow multiple headers (*, *) 119 PASS Disallow multiple headers (, http://localhost:8800) 120 PASS Disallow multiple headers (*, http://localhost:8800) 121 PASS Disallow multiple headers (http://localhost:8800, http://localhost:8800) 122 122 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cors/request-headers-expected.txt
r213914 r220731 16 16 FAIL Strange allowheaders (case insensitive) A network error occurred. 17 17 PASS INVALID_STATE_ERR on setRequestHeader before open() 18 FAIL INVALID_STATE_ERR on setRequestHeader after send() The operation was aborted.18 FAIL INVALID_STATE_ERR on setRequestHeader after send() A network error occurred. 19 19 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cors/response-headers-expected.txt
r213914 r220731 18 18 19 19 20 FAIL getResponseHeader: Expose Access-Control-Expose-Headers (x-custom-header-comma) The operation was aborted.21 FAIL getResponseHeader: Expose second Access-Control-Expose-Headers (x-second-expose) The operation was aborted.22 FAIL getResponseHeader: Don't trim whitespace The operation was aborted.23 FAIL getResponseHeader: x-custom-header bytes The operation was aborted.24 FAIL getResponseHeader: Exposed server field readable (Date) The operation was aborted.25 FAIL getResponseHeader: Cache-Control: readable by default The operation was aborted.26 FAIL getResponseHeader: Content-Language: readable by default The operation was aborted.27 FAIL getResponseHeader: Expires: readable by default The operation was aborted.28 FAIL getResponseHeader: Last-Modified: readable by default The operation was aborted.29 FAIL getResponseHeader: Pragma: readable by default The operation was aborted.30 FAIL getResponseHeader: Server: unreadable by default The operation was aborted.31 FAIL getResponseHeader: X-Powered-By: unreadable by default The operation was aborted.20 FAIL getResponseHeader: Expose Access-Control-Expose-Headers (x-custom-header-comma) A network error occurred. 21 FAIL getResponseHeader: Expose second Access-Control-Expose-Headers (x-second-expose) A network error occurred. 22 FAIL getResponseHeader: Don't trim whitespace A network error occurred. 23 FAIL getResponseHeader: x-custom-header bytes A network error occurred. 24 FAIL getResponseHeader: Exposed server field readable (Date) A network error occurred. 25 FAIL getResponseHeader: Cache-Control: readable by default A network error occurred. 26 FAIL getResponseHeader: Content-Language: readable by default A network error occurred. 27 FAIL getResponseHeader: Expires: readable by default A network error occurred. 28 FAIL getResponseHeader: Last-Modified: readable by default A network error occurred. 29 FAIL getResponseHeader: Pragma: readable by default A network error occurred. 30 FAIL getResponseHeader: Server: unreadable by default A network error occurred. 31 FAIL getResponseHeader: X-Powered-By: unreadable by default A network error occurred. 32 32 FAIL getResponseHeader: Combined testing of cors response headers assert_equals: x-custom-header expected (string) "test, test" but got (object) null 33 FAIL getResponse: don't expose x-nonexposed The operation was aborted.34 FAIL getAllResponseHeaders: don't expose x-nonexposed The operation was aborted.33 FAIL getResponse: don't expose x-nonexposed A network error occurred. 34 FAIL getAllResponseHeaders: don't expose x-nonexposed A network error occurred. 35 35 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=match_origin 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=match_wildcard 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_multi-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=multi 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_null-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=null 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=origin 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=uppercase 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_space-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=space 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=wildcard 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_zero-expected.txt
r219766 r220731 1 1 Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=zero 2 CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.2 CONSOLE MESSAGE: line 13: NetworkError: A network error occurred. 3 3 Description 4 4 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt
r219663 r220731 1 1 Blocked access to external URL http://nonexistent-origin.localhost%7D:8800/ 2 2 3 FAIL XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) assert_throws: function "function () 4 { 5 xhr.send("Test Message"); 6 }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19 3 PASS XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) 7 4 -
trunk/Source/WebCore/ChangeLog
r220730 r220731 1 2017-08-14 Chris Dumez <cdumez@apple.com> 2 3 XHR should only fire an abort event if the cancellation was requested by the client 4 https://bugs.webkit.org/show_bug.cgi?id=175546 5 6 Reviewed by Youenn Fablet. 7 8 XHR should only fire an abort event if the cancellation was requested by the client, otherwise it should fire an error event. 9 Blink and Gecko already match the specification. 10 11 Specification: 12 - https://xhr.spec.whatwg.org/#handle-errors 13 - https://xhr.spec.whatwg.org/#the-abort()-method 14 15 Test: http/tests/navigation/page-cache-xhr-in-pagehide.html 16 17 * xml/XMLHttpRequest.cpp: 18 (WebCore::XMLHttpRequest::open): 19 (WebCore::XMLHttpRequest::abort): 20 (WebCore::XMLHttpRequest::abortError): 21 (WebCore::XMLHttpRequest::didFail): 22 * xml/XMLHttpRequest.h: 23 1 24 2017-08-14 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r219901 r220731 411 411 m_sendFlag = false; 412 412 m_uploadComplete = false; 413 m_wasAbortedByClient = false; 413 414 414 415 // clear stuff from possible previous load … … 779 780 Ref<XMLHttpRequest> protectedThis(*this); 780 781 782 m_wasAbortedByClient = true; 781 783 if (!internalAbort()) 782 784 return; … … 873 875 void XMLHttpRequest::abortError() 874 876 { 877 ASSERT(m_wasAbortedByClient); 875 878 genericError(); 876 879 dispatchErrorEvents(eventNames().abortEvent); … … 1004 1007 return; 1005 1008 1006 if (error.isCancellation()) { 1009 // The XHR specification says we should only fire an abort event if the cancelation was requested by the client. 1010 if (m_wasAbortedByClient && error.isCancellation()) { 1007 1011 m_exceptionCode = AbortError; 1008 1012 abortError(); -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r219901 r220731 218 218 219 219 bool m_sameOriginRequest { true }; 220 bool m_wasAbortedByClient { false }; 220 221 221 222 // Used for progress event tracking.
Note: See TracChangeset
for help on using the changeset viewer.