Summary: | [EFL] Implement layoutTestController.dumpResourceResponseMIMETypes | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
Component: | WebKit EFL | Assignee: | Chris Dumez <cdumez> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | gyuyoung.kim, lucas.de.marchi, rakuco, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 81891 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Chris Dumez
2012-04-26 03:40:52 PDT
Created attachment 139438 [details]
Patch
Once implemented, all the tests passed expect one:
- fast/preloader/script.html (MIME type is "application/javascript" instead of "application/x-javascript")
Mac and chromium ports already have platform-specific expectation to reflect this so I used the same expectation for the EFL port.
Comment on attachment 139438 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=139438&action=review > LayoutTests/ChangeLog:10 > + is is implemented in EFL port and add EFL expectation for > + fast/preloader/script.html. The explanation for adding a custom expectation you gave in comment #1 would be really helpful here. > Source/WebKit/efl/ewk/ewk_frame.h:138 > + const char *mime_type; /**< MIME type of the resource */ This is expected to be a read-only member, right? If so, it makes sense to declare it const char * const. Created attachment 139956 [details]
Patch
I have fixed the Changelog.
Note - however - that I did not change the type of mime_type struct member:
- The url member in the same struct cannot be changed either and is "const char *". Unlike the request struct, the response one cannot be changed at all.
- If I change to "const char * const", then this means I need to initialize it as soon as I create the struct (which is a bit inconvenient). The following code wouldn't work anymore:
Ewk_Frame_Resource_Response* redirectResponse;
Ewk_Frame_Resource_Response responseBuffer;
CString redirectUrl, mimeType;
if (coreResponse.isNull())
redirectResponse = 0;
else {
redirectUrl = coreResponse.url().string().utf8();
mimeType = coreResponse.mimeType().utf8();
responseBuffer.url = redirectUrl.data();
responseBuffer.status_code = coreResponse.httpStatusCode();
responseBuffer.mime_type = mimeType.data();
redirectResponse = &responseBuffer;
}
Ewk_Frame_Resource_Messages messages = { &request, redirectResponse };
Alright, looks fine then. Comment on attachment 139956 [details] Patch Rejecting attachment 139956 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: ile Source/WebKit/efl/ewk/ewk_frame.h Hunk #1 FAILED at 135. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit/efl/ewk/ewk_frame.h.rej patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp Hunk #1 succeeded at 592 with fuzz 1 (offset 34 lines). Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Martin Rob..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/ Full output: http://queues.webkit.org/results/12630197 Created attachment 140292 [details]
Patch for landing
Comment on attachment 140292 [details] Patch for landing Clearing flags on attachment: 140292 Committed r116158: <http://trac.webkit.org/changeset/116158> All reviewed patches have been landed. Closing bug. |