Re: RfC: WebApps Testing Process

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.

Why?

> 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:

http://dvcs.w3.org/hg/html/raw-file/4a2eef00b4cc/tests/approved/base64.html

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