[GTK] Some unit tests fail when using the network process
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Nov 2015 09:00:45 +0000 (09:00 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Nov 2015 09:00:45 +0000 (09:00 +0000)
commitd611097b73aab8686b7491ee1e777a183ae47341
tree2800ac0345cd2027ce964639ad193ac885a83b78
parent613c456636e08550685ab89142661a6c919a4794
[GTK] Some unit tests fail when using the network process
https://bugs.webkit.org/show_bug.cgi?id=151490

Reviewed by Martin Robinson.

Run the soup server in a separate thread in TestResources test to
avoid deadlocks.

This fixes /webkit2/WebKitWebView/sync-request-on-max-conns and
/webkit2/WebKitWebResource/get-data when using the network process.

* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(beforeAll): Create the WebKitTestServer with ServerRunInThread flag.
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer): When ServerRunInThread is
present, create a WorkQueue to run the server.
(WebKitTestServer::run): Run the server in the work queue if it
has been created.
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h: Convert server
type into server options as flags.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h