Bug 58222 - [GTK] Implement layoutTestController.dumpResourceResponseMIMETypes
Summary: [GTK] Implement layoutTestController.dumpResourceResponseMIMETypes
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
Depends on:
Blocks: 58234 58235
  Show dependency treegraph
 
Reported: 2011-04-11 01:53 PDT by Alejandro G. Castro
Modified: 2014-04-08 16:07 PDT (History)
5 users (show)

See Also:


Attachments
proposed patch (11.19 KB, patch)
2011-04-11 07:59 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (11.13 KB, patch)
2011-04-11 08:03 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (11.16 KB, patch)
2011-04-11 08:11 PDT, Philippe Normand
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2011-04-11 01:53:04 PDT
We need this function to support some tests:

fast/preloader
http/tests/mime/uppercase-mime-type.html
http/tests/loading/preload-append-scan.php
Comment 1 Philippe Normand 2011-04-11 07:59:21 PDT
Created attachment 89005 [details]
proposed patch
Comment 2 WebKit Review Bot 2011-04-11 08:01:16 PDT
Attachment 89005 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1

Tools/DumpRenderTree/LayoutTestController.h:183:  The parameter name "dumpResourceResponseMIMETypes" adds no information, so it should be removed.  [readability/parameter_name] [5]
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:948:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philippe Normand 2011-04-11 08:03:27 PDT
Created attachment 89006 [details]
proposed patch
Comment 4 WebKit Review Bot 2011-04-11 08:06:05 PDT
Attachment 89006 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1

Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:948:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Philippe Normand 2011-04-11 08:11:56 PDT
Created attachment 89007 [details]
proposed patch
Comment 6 Martin Robinson 2011-04-11 09:18:56 PDT
Wouldn't it be simpler to just add the necessary API points that describe resource loading?
Comment 7 Philippe Normand 2011-04-12 05:46:10 PDT
(In reply to comment #6)
> Wouldn't it be simpler to just add the necessary API points that describe resource loading?

Hum what are those?
That patch is highly inspired by the same feature present in the Qt port.
Comment 8 Martin Robinson 2011-04-13 09:32:17 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > Wouldn't it be simpler to just add the necessary API points that describe resource loading?
> 
> Hum what are those?
> That patch is highly inspired by the same feature present in the Qt port.

Sergio will have more information, but essentially we just need to implement a few signals that describe resource loading. I sent a mail to the list about this some time ago, but essentially what's missing for resource loading signals is:

- dispatchWillSendRequest
   (+) WebKitWebView::resource-request-starting(Frame, Resource,
Request, Response)
- dispatchDidReceiveResponse
   (+) WebKitWebView::resource-response-received(Frame, Resource, Response)
- dispatchDidFinishLoading
   (+) WebKitWebView::resource-loading-finished(Frame, Resource)
- dispatchDidReceiveContentLength
   (+) WebKitWebView::resource-content-length-received(Frame, Resource, Length)
- dispatchDidFailLoading
   (+) WebKitWebView::resource-load-failed(Frame, Resource, Error)
- dispatchDidLoadResourceFromMemoryCache
   (+) WebKitWebView::resource-loaded-from-memory-cache(Frame, Resource, Error)
- willCacheResponse
   (+) WebKitWebView::resource-will-be-cached(Frame, Resource)

To implement this feature we would not need all of these either.
Comment 9 Martin Robinson 2011-04-26 16:15:13 PDT
Comment on attachment 89007 [details]
proposed patch

Philippe mentioned that he has almost implemented all these signals. If that's the case, I owe him a case of beer.
Comment 10 Xan Lopez 2011-04-26 16:16:19 PDT
Comment on attachment 89007 [details]
proposed patch

Phil has promised to do the loader signals RSN, so r- for now.
Comment 11 Zan Dobersek 2012-03-15 12:52:53 PDT
(In reply to comment #10)
> (From update of attachment 89007 [details])
> Phil has promised to do the loader signals RSN, so r- for now.

loader signals exist now, but trying to get this to work, mime type must be transferred somehow to the signal's callback. Is this doable through SoupMessage or should WebKitNetworkResponse be expanded?
Comment 12 Carlos Garcia Campos 2013-05-14 02:22:53 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (From update of attachment 89007 [details] [details])
> > Phil has promised to do the loader signals RSN, so r- for now.
> 
> loader signals exist now, but trying to get this to work, mime type must be transferred somehow to the signal's callback. Is this doable through SoupMessage or should WebKitNetworkResponse be expanded?

WebKitWebResource should return a valid mime type, but it's created with just a URL. Adding webkit_network_request_get_mime_type would work, but I'm not sure it's worth adding new wk1 API at this point. Does this work in wk2? I would focus on make it work in wk2 instead.
Comment 13 Carlos Garcia Campos 2013-05-14 02:34:35 PDT
This works in wk2.
Comment 14 Martin Robinson 2014-04-08 16:07:46 PDT
I don't think we need this now that WebKit1 is gone.