[webkit-dev] Determining platform in LayoutTests

Sam Weinig sam.weinig at gmail.com
Sun Mar 28 19:26:16 PDT 2010

On Sun, Mar 28, 2010 at 7:14 PM, Dan Bernstein <mitz at apple.com> wrote:

> On Mar 28, 2010, at 7:08 PM, Sam Weinig wrote:
> I am not sure which tests you are referring to that use the user-agent to
> change behavior, but that is not the way it is supposed to be done. Instead,
> tests that test a platform specific behavior should go in the
> LayoutTest/YOURPLATFORM directory. If it is just a platform specific result,
> the results should go in LayoutTest/YOURPLATFORM.
> This works for some tests, but is not ideal for tests that encode expected
> behavior (in particular, “script tests”) and output some sort of PASS/FAIL
> result. In such cases, unless the test has a way to adapt to platform
> conventions, FAIL could end up being the platform-specific result for some
> platforms, which isn’t so great.
In these case, we should do the first option I gave, and have different
tests.  This is not an ideal solution, for sure, but I think it is better
and adding branches to the tests themselves.

One alternative, where applicable, is to make the behavior a runtime
setting, and thus enable testing it on all platforms. Performance could get
in the way of this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100328/d9f1ae9d/attachment.html>

More information about the webkit-dev mailing list