Bug 42546 - WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
Summary: WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Mikhail Pozdnyakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-07-18 21:47 PDT by Maciej Stachowiak
Modified: 2012-09-29 02:58 PDT (History)
9 users (show)

See Also:


Attachments
Patch (10.82 KB, patch)
2011-10-21 06:30 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (10.72 KB, patch)
2011-10-25 02:09 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
patch (7.63 KB, patch)
2012-09-07 07:54 PDT, Mikhail Pozdnyakov
kenneth: review+
Details | Formatted Diff | Diff
to be landed (8.18 KB, patch)
2012-09-14 05:36 PDT, Mikhail Pozdnyakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2010-07-18 21:47:43 PDT
WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
Comment 1 Maciej Stachowiak 2010-07-18 21:52:22 PDT
<rdar://problem/8204916>
Comment 2 Balazs Kelemen 2011-08-10 07:57:52 PDT
We have created a Qt specific bug for this issue. Later we found out that it is not platform specific and removed the [Qt] prefix. I mark this as duplicate because #42330 already has patches uploaded. Sorry for the confusion. If it is important to you to track the issue here please invert the direction of duplication and we will reupload the patch.

*** This bug has been marked as a duplicate of bug 42330 ***
Comment 3 Balazs Kelemen 2011-08-10 08:03:57 PDT
Sorry for the noise. I missed it, these are not the same issue. :-S
Comment 4 Fehér Zsolt 2011-08-25 02:38:48 PDT
I have a patch, that look like this: https://gist.github.com/1156343
One test failed because of an unknown reason.
http/tests/security/feed-urls-from-remote.html
The test has a beginTests() method. But this method didn't run. Do somebody have any idea, why not?
Comment 5 Balazs Kelemen 2011-10-21 06:30:44 PDT
Created attachment 111958 [details]
Patch
Comment 6 Adam Roben (:aroben) 2011-10-24 09:33:04 PDT
Comment on attachment 111958 [details]
Patch

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

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h:137
>  enum {
> +    WKBundlePagePolicyActionIgnore,
>      WKBundlePagePolicyActionPassThrough,
>      WKBundlePagePolicyActionUse

I believe this breaks ABI compatibility with Safari 5.1 (i.e., will break nightly builds).

> Tools/ChangeLog:17
> +        waitToPolicyDelegate. We need to ignore the navigation action if we
> +        are not in permissive mode. This has not caused a problem with
> +        waitToPolicyDelegate because with that we explicitly stop testing
> +        via notifyDone and do not send any request after that.

What is "waitToPolicyDelegate"?

> LayoutTests/platform/wk2/Skipped:564
>  # WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
>  # <https://bugs.webkit.org/show_bug.cgi?id=42546>
> -fast/loader/javascript-url-hierarchical-execution.html
> -fast/loader/onload-policy-ignore-for-frame.html
> -fast/loader/reload-policy-delegate.html
> -http/tests/misc/policy-delegate-called-twice.html
> -http/tests/misc/redirect-to-external-url.html
> -http/tests/security/feed-urls-from-remote.html
> +#fast/loader/javascript-url-hierarchical-execution.html
> +#fast/loader/onload-policy-ignore-for-frame.html
> +#fast/loader/reload-policy-delegate.html
> +#http/tests/misc/policy-delegate-called-twice.html
> +#http/tests/misc/redirect-to-external-url.html
> +#http/tests/security/feed-urls-from-remote.html

You should delete the lines rather than just commenting them out.
Comment 7 Balazs Kelemen 2011-10-25 02:09:21 PDT
Created attachment 112308 [details]
Patch
Comment 8 Balazs Kelemen 2011-10-25 02:11:11 PDT
(In reply to comment #6)
> (From update of attachment 111958 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=111958&action=review
> 
> > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h:137
> >  enum {
> > +    WKBundlePagePolicyActionIgnore,
> >      WKBundlePagePolicyActionPassThrough,
> >      WKBundlePagePolicyActionUse
> 
> I believe this breaks ABI compatibility with Safari 5.1 (i.e., will break nightly builds).

Moved the new one to the end.

> 
> > Tools/ChangeLog:17
> > +        waitToPolicyDelegate. We need to ignore the navigation action if we
> > +        are not in permissive mode. This has not caused a problem with
> > +        waitToPolicyDelegate because with that we explicitly stop testing
> > +        via notifyDone and do not send any request after that.
> 
> What is "waitToPolicyDelegate"?

Added a quick explanation.

> 
> > LayoutTests/platform/wk2/Skipped:564
> >  # WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
> >  # <https://bugs.webkit.org/show_bug.cgi?id=42546>
> > -fast/loader/javascript-url-hierarchical-execution.html
> > -fast/loader/onload-policy-ignore-for-frame.html
> > -fast/loader/reload-policy-delegate.html
> > -http/tests/misc/policy-delegate-called-twice.html
> > -http/tests/misc/redirect-to-external-url.html
> > -http/tests/security/feed-urls-from-remote.html
> > +#fast/loader/javascript-url-hierarchical-execution.html
> > +#fast/loader/onload-policy-ignore-for-frame.html
> > +#fast/loader/reload-policy-delegate.html
> > +#http/tests/misc/policy-delegate-called-twice.html
> > +#http/tests/misc/redirect-to-external-url.html
> > +#http/tests/security/feed-urls-from-remote.html
> 
> You should delete the lines rather than just commenting them out.

Fixed.
Comment 9 Balazs Kelemen 2011-10-27 13:44:19 PDT
Comment on attachment 112308 [details]
Patch

It's not the desired solution according to IRC discussion.
The UI process should know about what's going on.
Comment 10 Mikhail Pozdnyakov 2012-09-05 08:04:50 PDT
Could I take it (since there was no activity on this bug for almost a year)?
Comment 11 Balazs Kelemen 2012-09-05 08:14:49 PDT
(In reply to comment #10)
> Could I take it (since there was no activity on this bug for almost a year)?

Sure, feel free to take it.
Comment 12 Mikhail Pozdnyakov 2012-09-05 08:16:21 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > Could I take it (since there was no activity on this bug for almost a year)?
> 
> Sure, feel free to take it.
Thanks!
Comment 13 Mikhail Pozdnyakov 2012-09-07 07:54:03 PDT
Created attachment 162772 [details]
patch
Comment 14 Mikhail Pozdnyakov 2012-09-07 07:59:33 PDT
(In reply to comment #13)
> Created an attachment (id=162772) [details]
> patch

Did not ask cq? as this patch should land after bug95974 is resolved so that fast/loader/onload-policy-ignore-for-frame.html passes.
Comment 15 Mikhail Pozdnyakov 2012-09-14 05:36:26 PDT
Created attachment 164118 [details]
to be landed

Skipped fast/loader/onload-policy-ignore-for-frame.html to remove dependency to bug95974, as looks like it will take more time to land..
Comment 16 WebKit Review Bot 2012-09-14 06:08:46 PDT
Comment on attachment 164118 [details]
to be landed

Clearing flags on attachment: 164118

Committed r128600: <http://trac.webkit.org/changeset/128600>
Comment 17 WebKit Review Bot 2012-09-14 06:08:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Balazs Kelemen 2012-09-29 02:58:16 PDT
Are we really ready with this? It still not goes through the UI process.