[webkit-dev] Determining platform in LayoutTests

Dan Bernstein mitz at apple.com
Sun Mar 28 19:14:41 PDT 2010


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.

> 
> -Sam
> 
> On Sun, Mar 28, 2010 at 1:11 PM, Martin Robinson <mrobinson at webkit.org> wrote:
> Apologies in advance if this has been hashed out before, but a
> cursory search of the list history didn't turn anything up.
> 
> It seems that in LayoutTests platform specific behavior is generally handled by
> examining the user agent. I'm currently in the process of fixing
> editing/selection/extend-selection-after-double-click.html for GTK+. This
> test will have different results for GTK+ and Qt (it's currently
> skipped on both)
> because the selection behavior is different between the toolkits. This
> will become even
> more of an issue as we try to bring selection behavior in line with
> standard GTK+
> behavior (see bug https://bugs.webkit.org/show_bug.cgi?id=36627 ).
> 
> I'm not sure that you can tell Qt and GTK+ apart via  the user agent,
> so does it make
> sense for LayoutTestController to expose this information somehow or
> just fix the user
> agent? Is there an alternative?
> 
> Martin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

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


More information about the webkit-dev mailing list