W3C home > Mailing lists > Public > public-test-infra@w3.org > April to June 2011

Re: RfC: WebApps Testing Process

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 4 Apr 2011 18:36:30 -0400
Message-ID: <BANLkTinRr-dJ0ddkYdibH-FQvBoRBpcHfw@mail.gmail.com>
To: Garrett Smith <dhtmlkitchen@gmail.com>
Cc: Arthur Barstow <art.barstow@nokia.com>, public-test-infra@w3.org
On Sun, Apr 3, 2011 at 7:45 PM, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> I'd rather see the `format_value` function broken up. It makes
> non-standard expectations of host objects (`val`) and that there is a
> global `Node` object. Which standard requires that?

DOM Core.  The test harness assumes in many places that basic stuff
from DOM Core exists -- DOMException is another example.

> Instead of making decisions based on what is on the object's prototype
> chain, It is safer to make a more direct inference.

Meaning what?

> However, taking a step back, I want to know why the function is so generalized.

Because assert_equals can be passed any two JavaScript values, by
design.  So in formatting the expected and actual values, we need to
be able to format any JavaScript values.

> I would rather see this functionality broken up so
> that assertions about Node objects are passed Nodes, and then the
> formatting can be in format_node, or stringify_node, etc.


> And it can
> get worse when you have more object types or subtypes, such as any of
> the various DOM collections.

How is it "worse" to have all the logic in one function instead of the
exact same logic being spread over several functions?

> What is the HTML WG using a javascript test harness for?

Its JavaScript features.  For instance, my base64 tests were recently approved:

Received on Monday, 4 April 2011 22:37:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:34:06 UTC