LayoutTests/imported/w3c:
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2018 00:47:20 +0000 (00:47 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2018 00:47:20 +0000 (00:47 +0000)
commit554fd4173b9c21f2ddbba675aac92b0cec002329
treea804439106c1c43679c0fc70b9750f1e68a5526c
parent6c5a987c6e41f5b29f61359e10f5c90a93ca5ac9
LayoutTests/imported/w3c:
Allow cross-origin redirections for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723

Reviewed by Alex Christensen.

* web-platform-tests/XMLHttpRequest/access-control-and-redirects-expected.txt:

Source/WebKit:
Allow SameOrigin credentials handling for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723

Reviewed by Alex Christensen.

In case of SameOrigin credentials, we need to stop the current load
in case of cross origin redirection to restart a load with a different session.
Covered by updated WK2 tests.
Rebased WK1 tests since this is Wk1 only.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
* NetworkProcess/NetworkResourceLoader.h:

LayoutTests:
Allow SameOrigin credentials handling for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723

Reviewed by Alex Christensen.

* http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects.html:
* http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt:
* http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt.
* platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt.
* platform/mac-wk1/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt.
* platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt.
* platform/win/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt.
* platform/win/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects.html
LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt
LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/access-control-and-redirects-expected.txt
LayoutTests/platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt
LayoutTests/platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt
LayoutTests/platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/NetworkProcess/NetworkResourceLoader.h