W3C home > Mailing lists > Public > public-html-testsuite@w3.org > November 2010

Re: Request for Feedback On Test Harness

From: James Graham <jgraham@opera.com>
Date: Tue, 30 Nov 2010 18:31:24 +0100
Message-ID: <4CF534EC.5060405@opera.com>
To: "'public-html-testsuite@w3.org'" <public-html-testsuite@w3.org>
On 11/30/2010 10:45 AM, James Graham wrote:

> Primarily I am interested in feedback about the design and API since
> those are harder to fix later. However comments on the implementation
> are also welcome; I know of a few problems already that I intend to
> address.

Philip has suggested a useful-sounding API change to me; the step 
function should return a function for executing the step rather than 
execute the step itself. That would mean that in the common case where 
you want a test step to execute in response to an event handler, you 
could unwrap one layer of function(){}s and just do e.g.

var test = async_test();
addEventListener("load", test.step(function() {assert_true(true)}), false)

The old behaviour could be easily replicated by simply executing the 
returned function immediately:

test.step(function() {assert_true(true)})()

Does this sound problematic, particularly to people who have already 
submitted tests? Otherwise I am inclined to make the change.
Received on Tuesday, 30 November 2010 17:31:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:49:37 UTC