[SOUP] REGRESSION(r192761): Broke resource URIs for applications that use g_resource_...
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jan 2016 21:22:22 +0000 (21:22 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jan 2016 21:22:22 +0000 (21:22 +0000)
commitab41d173cf45d6e85bbdbfc0c65e9c6ba5d71ee0
treec07fc60c51cf2a61784b7d23ac3b114090591c94
parenta1c808f9e767007006913f6219f61362c5dab580
[SOUP] REGRESSION(r192761): Broke resource URIs for applications that use g_resource_load in a web extension
https://bugs.webkit.org/show_bug.cgi?id=152634

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Load GResource URIs locally, not in the network process. Applications expect calling
g_resource_load in a web extension to make it possible to load resource URIs, but that
doesn't work now that the network process is in use. Loading them locally solves this.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testLoadFromGResource): Added test.
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(registerGResource): Added.
(webkit_web_extension_initialize_with_user_data): Load the test gresource.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/boring.html: Added.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml: Add an HTML file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/boring.html [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml