[Webkit-unassigned] [Bug 126119] New: [GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 21 06:28:10 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=126119

           Summary: [GTK] Test /webkit2/WebKitWebResource/mime-type fails
                    when run after /webkit2/WebKitWebView/resources
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: Gtk, Soup
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: cgarcia at igalia.com
                CC: danw at gnome.org, gns at gnome.org, svillar at igalia.com


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list