RESOLVED INVALID 58222
[GTK] Implement layoutTestController.dumpResourceResponseMIMETypes
https://bugs.webkit.org/show_bug.cgi?id=58222
Summary [GTK] Implement layoutTestController.dumpResourceResponseMIMETypes
Alejandro G. Castro
Reported 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
Attachments
proposed patch (11.19 KB, patch)
2011-04-11 07:59 PDT, Philippe Normand
no flags
proposed patch (11.13 KB, patch)
2011-04-11 08:03 PDT, Philippe Normand
no flags
proposed patch (11.16 KB, patch)
2011-04-11 08:11 PDT, Philippe Normand
mrobinson: review-
Philippe Normand
Comment 1 2011-04-11 07:59:21 PDT
Created attachment 89005 [details] proposed patch
WebKit Review Bot
Comment 2 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.
Philippe Normand
Comment 3 2011-04-11 08:03:27 PDT
Created attachment 89006 [details] proposed patch
WebKit Review Bot
Comment 4 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.
Philippe Normand
Comment 5 2011-04-11 08:11:56 PDT
Created attachment 89007 [details] proposed patch
Martin Robinson
Comment 6 2011-04-11 09:18:56 PDT
Wouldn't it be simpler to just add the necessary API points that describe resource loading?
Philippe Normand
Comment 7 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.
Martin Robinson
Comment 8 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.
Martin Robinson
Comment 9 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.
Xan Lopez
Comment 10 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.
Zan Dobersek
Comment 11 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?
Carlos Garcia Campos
Comment 12 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.
Carlos Garcia Campos
Comment 13 2013-05-14 02:34:35 PDT
This works in wk2.
Martin Robinson
Comment 14 2014-04-08 16:07:46 PDT
I don't think we need this now that WebKit1 is gone.
Note You need to log in before you can comment on or make changes to this bug.