Bug 107270

Summary: [chromium] move methods interacting with willSendRequest to TestRunner
Product: WebKit Reporter: jochen
Component: Tools / TestsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dcarney, dglazkov, fishd, jamesr, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 91308    
Attachments:
Description Flags
Patch
none
Patch none

Description jochen 2013-01-18 05:46:14 PST
// Causes WillSendRequest to clear certain headers.
    void setWillSendRequestClearHeader(const CppArgumentList&, CppVariant*);

    // Causes WillSendRequest to block redirects.
    void setWillSendRequestReturnsNullOnRedirect(const CppArgumentList&, CppVariant*);

    // Causes WillSendRequest to return an empty request.
    void setWillSendRequestReturnsNull(const CppArgumentList&, CppVariant*);
Comment 1 jochen 2013-01-20 14:33:53 PST
Created attachment 183686 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-20 14:37:45 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 WebKit Review Bot 2013-01-20 15:13:16 PST
Comment on attachment 183686 [details]
Patch

Attachment 183686 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/16011040

New failing tests:
media/media-blocked-by-willsendrequest.html
http/tests/misc/will-send-request-returns-null-on-redirect.html
Comment 4 jochen 2013-01-21 02:39:26 PST
Created attachment 183743 [details]
Patch
Comment 5 Kent Tamura 2013-01-21 02:48:37 PST
Comment on attachment 183743 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183743&action=review

> Tools/DumpRenderTree/chromium/WebViewHost.cpp:898
> +    if (request.url().isEmpty())
> +        return;

Why is this needed?
Comment 6 jochen 2013-01-21 02:52:17 PST
Comment on attachment 183743 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183743&action=review

>> Tools/DumpRenderTree/chromium/WebViewHost.cpp:898
>> +        return;
> 
> Why is this needed?

WebTestProxyBase::willSendRequest can replace the request with an empty request to block the request.

Without this, the call to webkit_support::RewriteLayoutTestsURL at the end of willSendRequest will put there a non-empty URL, and the request doesn't get blocked
Comment 7 Kent Tamura 2013-01-21 02:54:49 PST
Comment on attachment 183743 [details]
Patch

looks ok
Comment 8 WebKit Review Bot 2013-01-21 03:17:50 PST
Comment on attachment 183743 [details]
Patch

Clearing flags on attachment: 183743

Committed r140318: <http://trac.webkit.org/changeset/140318>
Comment 9 WebKit Review Bot 2013-01-21 03:17:54 PST
All reviewed patches have been landed.  Closing bug.