It works in the bots because /webkit2/WebKitWebView/resources is skipped.
TEST: Programs/WebKit2APITests/TestResources... (pid=29650)
ERROR:../../Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp:420:void testWebResourceMimeType(SingleResourceLoadTest*, gconstpointer): assertion failed (webkit_uri_response_get_mime_type(response) == "image/vnd.microsoft.icon"): ("" == "image/vnd.microsoft.icon")
GTester: last random seed: R02Sbe744525dd8684ce8d2abbd37b41d1fe
The problem is that when the blank.ico resource is loaded from the disk cache, the mime type is null, because the soup cache doesn't cache sniffed mime types. This doesn't happen when a resource is loaded form the memory cache, because the ResourceResponse is cached, not only the headers. I think the disk cache should also cache the sniffed content type, but that needs to be done in soup. For now we can workaround the issue in the unit test by making sure that resources that can be cached, also include the Content-Type header, this way the mime type won't be sniffed and it will be cached as a HTTP header in the disk cache.
Created attachment 219849 [details]
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment on attachment 219849 [details]
You are doing an awesome job fixing the unit tests as always!
(In reply to comment #3)
> (From update of attachment 219849 [details])
> You are doing an awesome job fixing the unit tests as always!
Thanks! I want to make sure unit tests are in a good shape so that we can use them to work on network process.
Committed r160965: <http://trac.webkit.org/changeset/160965>