RESOLVED FIXED 97034
[WK2][WTR] Policy client: dumping from decidePolicyForResponse callback
https://bugs.webkit.org/show_bug.cgi?id=97034
Summary [WK2][WTR] Policy client: dumping from decidePolicyForResponse callback
Mikhail Pozdnyakov
Reported 2012-09-18 11:50:06 PDT
WTR WKBundlePagePolicyClient should dump data from decidePolicyForResponse callback in order to unskip some of http/tests/download tests.
Attachments
patch (6.16 KB, patch)
2012-09-18 11:59 PDT, Mikhail Pozdnyakov
ap: review-
buildbot: commit-queue-
patch v2 (7.80 KB, patch)
2012-09-20 07:01 PDT, Mikhail Pozdnyakov
no flags
patch v3 (7.54 KB, patch)
2012-09-20 07:10 PDT, Mikhail Pozdnyakov
ap: review-
ap: commit-queue-
patch v4 (7.62 KB, patch)
2012-09-20 13:43 PDT, Mikhail Pozdnyakov
no flags
patch v5 (7.61 KB, patch)
2012-09-20 13:51 PDT, Mikhail Pozdnyakov
buildbot: commit-queue-
patch v6 (8.93 KB, patch)
2012-09-21 00:23 PDT, Mikhail Pozdnyakov
kenneth: review+
webkit.review.bot: commit-queue-
to be landed (8.95 KB, patch)
2012-09-26 08:20 PDT, Mikhail Pozdnyakov
no flags
Mikhail Pozdnyakov
Comment 1 2012-09-18 11:59:50 PDT
Build Bot
Comment 2 2012-09-18 12:13:09 PDT
Chris Dumez
Comment 3 2012-09-18 12:24:42 PDT
Comment on attachment 164599 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=164599&action=review > Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1321 > + if (!isHTTPOrHTTPSScheme(scheme.get())) I don't see this check in Mac port's DRT implementation. Why is it needed? > Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1329 > + const size_t position = disposition.find('='); The suggested filename is already parsed in the resource response. I think it would be nicer to add the corresponding C API in WKURLResponse to retrieve the suggested file name from the response.
Build Bot
Comment 4 2012-09-18 12:25:29 PDT
Alexey Proskuryakov
Comment 5 2012-09-18 14:01:02 PDT
Comment on attachment 164599 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=164599&action=review It's surprising that linker complains. Are you using a different WebCore method for WK2 than is used in WK1? > LayoutTests/platform/wk2/Skipped:858 > +# Bundle client is not asked to decide policy for response. Could you elaborate? InjectedBundlePagePolicyClient::decidePolicyForResponse certainly exists. Is it not being called?
Alexey Proskuryakov
Comment 6 2012-09-18 14:03:17 PDT
Comment on attachment 164599 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=164599&action=review >> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1329 >> + const size_t position = disposition.find('='); > > The suggested filename is already parsed in the resource response. I think it would be nicer to add the corresponding C API in WKURLResponse to retrieve the suggested file name from the response. It's not necessarily just parsed - on some platforms, it is produced by code outside WebKit. Re-implementing WebCore code in WKTR is not what we should be doing to test WebCore code. We are not testing it if we have a separate implementation in the tester.
Mikhail Pozdnyakov
Comment 7 2012-09-20 07:01:39 PDT
Created attachment 164912 [details] patch v2 Took comments from Chris and Alexey into consideration.
Mikhail Pozdnyakov
Comment 8 2012-09-20 07:10:43 PDT
Created attachment 164913 [details] patch v3 Removed also unnecessary scheme check from InjectedBundlePage::decidePolicyForResponse.
Kenneth Rohde Christiansen
Comment 9 2012-09-20 07:50:02 PDT
Comment on attachment 164913 [details] patch v3 View in context: https://bugs.webkit.org/attachment.cgi?id=164913&action=review > Source/WebKit2/Shared/API/c/WKURLResponse.cpp:55 > +WKStringRef WKURLResponseSuggestedFilename(WKURLResponseRef responseRef) WKURLResponseCopySuggestedFilename? Shouldn't it indicate that it is a copy? > Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1321 > + InjectedBundle::shared().stringBuilder()->append(toWTFString(WKURLResponseSuggestedFilename(response))); isn't it leaking here?
Alexey Proskuryakov
Comment 10 2012-09-20 08:23:33 PDT
> Shouldn't it indicate that it is a copy? Yes.
Alexey Proskuryakov
Comment 11 2012-09-20 08:26:49 PDT
Comment on attachment 164913 [details] patch v3 View in context: https://bugs.webkit.org/attachment.cgi?id=164913&action=review r- per Kenneth's comments. > Source/WebKit2/Shared/API/c/WKURLResponse.cpp:60 > +bool WKURLResponseIsAttachment(WKURLResponseRef responseRef) I'm not sure if I like this API, it might be too specific. But I don't have an alternative proposal.
Mikhail Pozdnyakov
Comment 12 2012-09-20 13:43:45 PDT
Created attachment 164975 [details] patch v4 Kenneth, thanks for the review!
Mikhail Pozdnyakov
Comment 13 2012-09-20 13:51:38 PDT
Created attachment 164976 [details] patch v5 rebased
Build Bot
Comment 14 2012-09-20 15:59:53 PDT
Mikhail Pozdnyakov
Comment 15 2012-09-21 00:23:09 PDT
Created attachment 165066 [details] patch v6 Exported WebCore::ResourceResponseBase::isAttachment() method for MAC port (to fix build on MAC).
Mikhail Pozdnyakov
Comment 16 2012-09-25 00:09:49 PDT
Any review or comments?
Kenneth Rohde Christiansen
Comment 17 2012-09-26 02:41:35 PDT
Comment on attachment 165066 [details] patch v6 View in context: https://bugs.webkit.org/attachment.cgi?id=165066&action=review > Source/WebKit2/Shared/API/c/WKURLResponse.h:45 > WK_EXPORT WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef); > > WK_EXPORT int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef); > > +WK_EXPORT WKStringRef WKURLResponseCopySuggestedFilename(WKURLResponseRef); > + > +WK_EXPORT bool WKURLResponseIsAttachment(WKURLResponseRef); I wonder why these are not grouped
WebKit Review Bot
Comment 18 2012-09-26 02:47:40 PDT
Comment on attachment 165066 [details] patch v6 Rejecting attachment 165066 [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: tching file Source/WebKit2/Shared/API/c/WKURLResponse.h patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp Hunk #1 FAILED at 1314. 1 out of 1 hunk FAILED -- saving rejects to file Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp.rej Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Kenneth Ro..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://queues.webkit.org/results/14027449
Mikhail Pozdnyakov
Comment 19 2012-09-26 08:20:24 PDT
Created attachment 165806 [details] to be landed
WebKit Review Bot
Comment 20 2012-09-26 09:12:36 PDT
Comment on attachment 165806 [details] to be landed Clearing flags on attachment: 165806 Committed r129653: <http://trac.webkit.org/changeset/129653>
WebKit Review Bot
Comment 21 2012-09-26 09:12:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.