Summary: | [GTK] Implement layoutTestController.dumpResourceResponseMIMETypes | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alejandro G. Castro <alex> | ||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED INVALID | ||||||||||
Severity: | Normal | CC: | cgarcia, mrobinson, pnormand, webkit.review.bot, zan | ||||||||
Priority: | P2 | Keywords: | Gtk, LayoutTestFailure | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 58234, 58235 | ||||||||||
Attachments: |
|
Description
Alejandro G. Castro
2011-04-11 01:53:04 PDT
Created attachment 89005 [details]
proposed patch
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.
Created attachment 89006 [details]
proposed patch
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.
Created attachment 89007 [details]
proposed patch
Wouldn't it be simpler to just add the necessary API points that describe resource loading? (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. (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 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 on attachment 89007 [details]
proposed patch
Phil has promised to do the loader signals RSN, so r- for now.
(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? (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. This works in wk2. I don't think we need this now that WebKit1 is gone. |