Bug 142018 - Layout test support for user content filters
Summary: Layout test support for user content filters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 09:51 PST by Brady Eidson
Modified: 2015-02-25 12:43 PST (History)
2 users (show)

See Also:


Attachments
Patch v1 (8.41 KB, patch)
2015-02-25 11:26 PST, Brady Eidson
thorton: review+
Details | Formatted Diff | Diff

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