Re: [webkit-dev] Determining platform in LayoutTests
On Sun, Mar 28, 2010 at 8:58 PM, Alexey Proskuryakov wrote: > > 28.03.2010, в 19:26, Sam Weinig написал(а): > > 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. > > That's how we've been doing it for some selection-related tests, and that's > definitely the best approach as far as testing is concerned. This way, all > code paths get tested on all platforms. > There's a FIXME in the handful of tests that do this to expose the editingBehavior setting and use that instead. That's clearly the right solution in this case. Ojan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Determining platform in LayoutTests
28.03.2010, в 19:26, Sam Weinig написал(а): > 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. That's how we've been doing it for some selection-related tests, and that's definitely the best approach as far as testing is concerned. This way, all code paths get tested on all platforms. - WBR, Alexey Proskuryakov ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Determining platform in LayoutTests
On Sun, Mar 28, 2010 at 7:14 PM, Dan Bernstein 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. -Sam ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Determining platform in LayoutTests
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 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@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > ___ > webkit-dev mailing list > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Determining platform in LayoutTests
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. -Sam On Sun, Mar 28, 2010 at 1:11 PM, Martin Robinson 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@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Determining platform in LayoutTests
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@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev