Beacon redirect responses should be CORS validated
https://bugs.webkit.org/show_bug.cgi?id=184378
Reviewed by Chris Dumez.
Source/WebKit:
Add CORS checks to any redirection response if mode is CORS.
Update response tainting and redirected accordingly.
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::validateResponse):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):
LayoutTests:
* TestExpectations:
* http/wpt/beacon/cors/cors-redirect-failure-expected.txt: Added.
* http/wpt/beacon/cors/cors-redirect-failure.html: Added.
* http/wpt/beacon/resources/redirect.py:
(main):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@230495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index 6c27397..93f005a 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -1004,6 +1004,8 @@
http/tests/websocket/tests/hybi/contentextensions [ Skip ]
http/wpt/beacon/contentextensions [ Skip ]
+http/wpt/beacon/cors/cors-redirect-failure.html [ DumpJSConsoleLogInStdErr ]
+
webkit.org/b/149072 svg/animations/svgboolean-animation-1.html [ Pass Failure ]
webkit.org/b/143085 media/track/track-mode.html [ Pass Timeout ]