Bug 107270 - [chromium] move methods interacting with willSendRequest to TestRunner
Summary: [chromium] move methods interacting with willSendRequest to TestRunner
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on:
Blocks: 91308
  Show dependency treegraph
 
Reported: 2013-01-18 05:46 PST by jochen
Modified: 2013-01-21 03:17 PST (History)
7 users (show)

See Also:


Attachments
Patch (17.10 KB, patch)
2013-01-20 14:33 PST, jochen
no flags Details | Formatted Diff | Diff
Patch (17.47 KB, patch)
2013-01-21 02:39 PST, jochen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.