WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126119
[GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources
https://bugs.webkit.org/show_bug.cgi?id=126119
Summary
[GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2...
Carlos Garcia Campos
Reported
2013-12-21 06:26:12 PST
It works in the bots because /webkit2/WebKitWebView/resources is skipped. TEST: Programs/WebKit2APITests/TestResources... (pid=29650) /webkit2/WebKitWebView/resources: OK /webkit2/WebKitWebView/history-cache: OK /webkit2/WebKitWebResource/loading: OK /webkit2/WebKitWebResource/response: OK /webkit2/WebKitWebResource/mime-type: ** 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") FAIL 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.
Attachments
Patch
(3.00 KB, patch)
2013-12-21 06:31 PST
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2013-12-21 06:31:19 PST
Created
attachment 219849
[details]
Patch
WebKit Commit Bot
Comment 2
2013-12-21 06:32:29 PST
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
Martin Robinson
Comment 3
2013-12-21 06:33:28 PST
Comment on
attachment 219849
[details]
Patch You are doing an awesome job fixing the unit tests as always!
Carlos Garcia Campos
Comment 4
2013-12-21 06:35:29 PST
(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.
Carlos Garcia Campos
Comment 5
2013-12-21 06:37:40 PST
Committed
r160965
: <
http://trac.webkit.org/changeset/160965
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug