haikuwebkit/LayoutTests/contentfiltering/modify-request-url-expected...

3 lines
60 B
HTML
Raw Permalink Normal View History

[Content Filtering] Support modifying request URLs https://bugs.webkit.org/show_bug.cgi?id=143599 rdar://problem/20442560 Reviewed by Darin Adler. Source/WebCore: Tests: contentfiltering/modify-request-url.html http/tests/contentfiltering/modify-redirect-request-url.html Allow NEFilterSource to modifiy request URLs. Also teach MockContentFilter to do the same for testing. * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::willSendRequest): If NEFilterSource provided a string representing a valid URL in decisionInfo[NEFilterSourceOptionsRedirectURL], then used that as the request URL. * platform/spi/cocoa/NEFilterSourceSPI.h: Temporarily defined NEFilterSourceOptionsRedirectURL. * testing/MockContentFilter.cpp: (WebCore::MockContentFilter::willSendRequest): If settings() has a valid modifiedRequestURL, use it as the request URL. Only do so once MockContentFilter has reached its decision point so that both initial requests and redirect requests can be tested. * testing/MockContentFilterSettings.h: Added modifiedRequestURL. (WebCore::MockContentFilterSettings::modifiedRequestURL): Ditto. (WebCore::MockContentFilterSettings::setModifiedRequestURL): Ditto. * testing/MockContentFilterSettings.idl: Ditto. LayoutTests: * contentfiltering/allow-after-add-data-expected.html: Changed to use pass.html. * contentfiltering/allow-after-finished-adding-data-expected.html: Ditto. * contentfiltering/allow-after-response-expected.html: Ditto. * contentfiltering/allow-after-will-send-request-expected.html: Ditto. * contentfiltering/block-after-add-data-expected.html: Ditto. * contentfiltering/block-after-add-data-then-allow-unblock-expected.html: Ditto. * contentfiltering/block-after-add-data-then-deny-unblock-expected.html: Ditto. * contentfiltering/block-after-finished-adding-data-expected.html: Ditto. * contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.html: Ditto. * contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.html: Ditto. * contentfiltering/block-after-response-expected.html: Ditto. * contentfiltering/block-after-response-then-allow-unblock-expected.html: Ditto. * contentfiltering/block-after-response-then-deny-unblock-expected.html: Ditto. * contentfiltering/block-after-will-send-request-expected.html: Ditto. * contentfiltering/block-after-will-send-request-then-allow-unblock-expected.html: Ditto. * contentfiltering/block-after-will-send-request-then-deny-unblock-expected.html: Ditto. * contentfiltering/modify-request-url-expected.html: Added. * contentfiltering/modify-request-url.html: Added. * contentfiltering/resources/fail.html: Added. * contentfiltering/resources/pass.html: Added. * http/tests/contentfiltering/allow-after-redirect-expected.html: Removed the body tag. * http/tests/contentfiltering/block-after-redirect-expected.html: Ditto. * http/tests/contentfiltering/modify-redirect-request-url-expected.html: Added. * http/tests/contentfiltering/modify-redirect-request-url.html: Added. Canonical link: https://commits.webkit.org/161635@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-10 19:00:31 +00:00
<!DOCTYPE html>
<iframe src="resources/pass.html"></iframe>