[webkit-dev] Test conversion to use W3C testharness.js

Ryosuke Niwa rniwa at webkit.org
Fri Mar 9 14:37:18 PST 2012

On Fri, Mar 9, 2012 at 2:28 PM, Jacob Goldstein <jacobg at adobe.com> wrote:

> I recently uploaded a patch to
> https://bugs.webkit.org/show_bug.cgi?id=80709 which converted an existing
> JavaScript regions parsing test to use the W3C testharness.js in place of
> js-test-pre.js/js-test-post.js.  This patch also places testharness.js
> and a WebKit-specific testharnessreport.js file in
> LayoutTests/fast/js/resources.

Can we put them in LayoutTests/resources instead? I always find it hard to
remember the path fast/js/resources.

In cases where tests need to be written for both the WebKit and W3C testing
> suites, having the ability to use testharness.js with WebKit tests would
> mean that the test file only needs to be written once, and yet can still
> rely on the functionality from both test harnesses.   As it stands now, if
> someone needs to write a test for both suites, they either have to
> implement all functionality from scratch, or write one version of the test
> to use js-test-pre.js and another to use testharness.js.  The inclusion of
> testharness.js in the WebKit repository alleviates the need for this
> duplication of effort.  The testharnessreport.js file was intended for
> customization of the capabilities provided by testharness.js, I've added a
> call to layoutTestController.dumpAsText() to this file to allow it to
> function as a WebKit JavaScript test.

I support the effort to make layout tests more compatible with W3C tests.

Is the plan to use testharness.js for all new tests? Or only tests that we
intend to contribute back to W3C?

Another concern is that changes to testharness.js in the future that break
> backward compatibility could then break WebKit tests.  This is an issue I
> plan to discuss with W3C members to determine if backward compatibility can
> be ensured.

There is no such a guarantee at the moment? That concerns me. On other
hand, we wouldn't be importing ToT version of testharness.js so if such an
incompatibility is introduced, we can migrate our tests on time as well.

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

More information about the webkit-dev mailing list