Bug 142018

Summary: Layout test support for user content filters
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1 thorton: review+

Description Brady Eidson 2015-02-25 09:51:59 PST
Layout test support for user content filters

As we work on the feature, we'll need tests.
Comment 1 Brady Eidson 2015-02-25 11:26:57 PST
Created attachment 247335 [details]
Patch v1
Comment 2 Tim Horton 2015-02-25 12:23:51 PST
Comment on attachment 247335 [details]
Patch v1

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

> LayoutTests/platform/gtk/TestExpectations:2341
> +http/tests/usercontentfilter [ Skip ]

You could skip in the global TestExpectations and unskip in Mac WK2 if you wanted to make less of a mess.

> Tools/WebKitTestRunner/mac/TestControllerMac.mm:104
> +    char urlCString[16384];
> +    WKStringGetUTF8CString(urlString.get(), urlCString, 16384);

This is pretty lazy :D
Comment 3 Brady Eidson 2015-02-25 12:34:38 PST
(In reply to comment #2)
> Comment on attachment 247335 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=247335&action=review
> 
> > LayoutTests/platform/gtk/TestExpectations:2341
> > +http/tests/usercontentfilter [ Skip ]
> 
> You could skip in the global TestExpectations and unskip in Mac WK2 if you
> wanted to make less of a mess.

Oh boy, will I ever!

> > Tools/WebKitTestRunner/mac/TestControllerMac.mm:104
> > +    char urlCString[16384];
> > +    WKStringGetUTF8CString(urlString.get(), urlCString, 16384);
> 
> This is pretty lazy :D

As discussed on IRC, the commonly used alternative of using pathOrURL() breaks down when you are running WKTR directly from within the directory where the test resides.

I'll maybe fix up the other sites that use that approach, in a separate patch :)
Comment 4 Brady Eidson 2015-02-25 12:43:27 PST
http://trac.webkit.org/changeset/180633